เพลงคอมพิวเตอร์



คอร์ดเป็น MIDI

มีซอฟต์แวร์หลายประเภทสำหรับการป้อนคอร์ดเพื่อสร้างการรวมโน้ต MIDI เครื่องมือยอดนิยมบางส่วน ได้แก่ :
  • คอร์ดกัปตัน (ผสมในคีย์): นี่คือเครื่องมือสร้างความก้าวหน้าของคอร์ดระดับมืออาชีพที่ช่วยให้คุณสร้างความก้าวหน้าของคอร์ดและแปลงเป็นโน้ต MIDI โดยปกติแล้วจะรวมเข้ากับเวิร์กสเตชันเสียงดิจิทัล (DAW) เป็นปลั๊กอิน เช่น Ableton Live, FL Studio เป็นต้น
  • Scaler 2: นี่คือเครื่องมือสร้างความก้าวหน้าของคอร์ดอันทรงพลังที่สามารถใช้เพื่อสำรวจรูปแบบต่างๆ และการผสมผสานของคอร์ด Scaler 2 ยังรองรับการแปลงคอร์ดที่สร้างขึ้นเป็น MIDI อีกด้วย
  • Orb Composer: นี่คือซอฟต์แวร์สร้างคอร์ดที่มีองค์ประกอบปัญญาประดิษฐ์ มันสามารถสร้างความก้าวหน้าของคอร์ดและทำนองใหม่ๆ ตามการเลือกของผู้ใช้ และส่งออกเป็นไฟล์ MIDI
  • RapidComposer: นี่คือเครื่องมือสร้างเพลงที่สามารถใช้ในการสร้างคอร์ด ท่วงทำนอง และดนตรีประกอบ มีอินเทอร์เฟซผู้ใช้ที่ใช้งานง่ายและรองรับการส่งออก MIDI
  • คธูลู (โดย Xfer Records): นี่คือตัวสร้างคอร์ด MIDI ที่ออกแบบมาเป็นปลั๊กอิน VST ที่สามารถรวมเข้ากับเวิร์กสเตชันเสียงดิจิทัลต่างๆ มีความสามารถในการสร้างความก้าวหน้าของคอร์ดและการแก้ไขคอร์ดอันทรงพลัง
  • MIDIculous: แม้ว่าโดยหลักแล้วจะเป็นซอฟต์แวร์สำหรับการเรียนรู้การเล่นเครื่องดนตรี แต่ก็มีฟังก์ชันการสร้างคอร์ดบางอย่างที่สามารถใช้เพื่อสร้างความก้าวหน้าของคอร์ดได้อย่างรวดเร็ว

    เสียงเป็น MIDI

    เทคโนโลยี Speech-to-MIDI จะแปลงสัญญาณเสียงในเสียงของคุณให้เป็นบันทึก MIDI และข้อมูล วิธีนี้ช่วยให้คุณสามารถร้องเพลงหรือฮัมทำนองเพลงและแปลงเป็นโน้ตดนตรีได้แบบเรียลไทม์ ซึ่งจากนั้นจะสามารถแก้ไขหรือใช้ในการเล่นเครื่องดนตรีแบบดิจิทัลได้
  • เหตุใดจึงต้องใช้เสียงพูดเป็น MIDI ข้อมูลเชิงสร้างสรรค์: การแสดงไอเดียทำได้เร็วกว่าการเล่นบนเครื่องดนตรี โดยเฉพาะอย่างยิ่งหากคุณไม่ใช่นักดนตรีที่ผ่านการฝึกฝน การแสดงสด: รวบรวมไอเดียต่างๆ อย่างรวดเร็วผ่านการร้องเพลงหรือการพากย์เสียง แล้วแปลงเป็นข้อมูล MIDI ที่ใช้งานได้ ควบคุมเครื่องดนตรีเสมือน: ใช้เสียงของคุณเพื่อควบคุมซินธิไซเซอร์ กลอง หรือเครื่องดนตรีใดๆ ที่สามารถรับข้อมูล MIDI
  • มันทำงานอย่างไร? อินพุตเสียง: คุณให้สัญญาณเสียง (เสียงของคุณ) เข้ากับระบบ การตรวจจับระดับเสียง: ซอฟต์แวร์หรือปลั๊กอินจะตรวจจับระดับเสียงของคุณ การแปลง MIDI: แปลงระดับเสียงและจังหวะที่ตรวจพบให้เป็นโน้ต MIDI ที่สอดคล้องกัน เอาท์พุต: ข้อมูล MIDI สามารถทริกเกอร์เครื่องดนตรีที่เข้ากันได้กับ MIDI เช่น ซินธิไซเซอร์เสมือนหรือแซมเพลอร์
  • เครื่องมือและซอฟต์แวร์สำหรับการแปลงคำพูดเป็น MIDI ต่อไปนี้เป็นเครื่องมือยอดนิยมบางส่วนที่สามารถช่วยคุณในกระบวนการนี้ได้: Ableton Live (สูงสุดสำหรับอุปกรณ์ถ่ายทอดสด): Ableton มีปลั๊กอิน pitch-to-MIDI บางตัว Max สำหรับอุปกรณ์ Live เช่น Audio เป็น MIDI สามารถแปลงเสียงร้องหรือเสียงเป็น MIDI ได้ Melodyne: เครื่องมือแก้ไขระดับเสียงอันทรงพลังที่สามารถส่งออกข้อมูล MIDI จากไฟล์เสียงได้ Antares ปรับแต่งอัตโนมัติ: เครื่องมือแก้ไขระดับเสียงอันโด่งดังนี้มีความสามารถในการส่งออก MIDI บางอย่าง WIDI Audio เป็น MIDI VST: แปลงอินพุตเสียงใดๆ ให้เป็น MIDI ได้ทันที Reaper (พร้อมปลั๊กอิน): Reaper DAW ช่วยให้สามารถติดตามและแปลงระดับเสียงได้ทันทีโดยใช้ปลั๊กอินเช่น ReaTune
  • การตั้งค่าพื้นฐาน ไมโครโฟน: ตั้งค่าไมโครโฟนเพื่อบันทึกเสียงของคุณ อินเทอร์เฟซเสียง: ใช้อินเทอร์เฟซเพื่อแนะนำสัญญาณเสียงเข้าสู่ DAW (Digital Audio Workstation) ซอฟต์แวร์แปลงคำพูดเป็น MIDI: เลือกเครื่องมือที่สามารถแปลงสัญญาณเสียงเข้าเป็น MIDI กำหนดค่าปลั๊กอินหรือซอฟต์แวร์เพื่อวิเคราะห์ข้อความขาเข้า เครื่องดนตรีเสมือน: กำหนดเส้นทางเอาต์พุต MIDI เพื่อควบคุมเครื่องดนตรีเสมือน
  • ขั้นตอนในการใช้คำพูดกับ MIDI ใน DAW ของคุณ บันทึกหรือพิมพ์เสียงของคุณ: ร้องเพลงหรือฮัมเพลงใส่ไมโครโฟน วิเคราะห์เสียง: ใช้ปลั๊กอินหรือซอฟต์แวร์แปลงคำพูดเป็น MIDI เพื่อวิเคราะห์เสียง สิ่งนี้จะแปลงเป็นสัญญาณ MIDI แก้ไขข้อมูล MIDI: หลังจากการแปลง ข้อมูล MIDI จะสามารถแก้ไขได้เช่นเดียวกับ MIDI อื่นๆ ใน DAW ของคุณ คุณสามารถแก้ไขเวลา เปลี่ยนบันทึก หรือเพิ่มการมอดูเลตได้ เครื่องดนตรีทริกเกอร์: ใช้ MIDI เพื่อเล่นเครื่องดนตรีเสมือนใดๆ ใน DAW ของคุณ
  • ความท้าทาย ความแม่นยำ: การแปลงคำพูดเป็น MIDI นั้นไม่ถูกต้อง 100% เสมอไป ความเข้าใจผิดเกี่ยวกับระดับเสียงหรือจังหวะอาจเกิดขึ้น โดยเฉพาะอย่างยิ่งกับอินพุตเสียงที่ซับซ้อน ดีเลย์: ขึ้นอยู่กับการตั้งค่าของคุณ อาจมีดีเลย์เล็กน้อย (ดีเลย์) ระหว่างเวลาที่คุณร้องเพลงและเวลาที่เล่นโน้ต MIDI ช่วงระดับเสียง: ซอฟต์แวร์บางตัวอาจมีปัญหาในการตรวจจับโทนเสียงที่สูงหรือต่ำมาก เคล็ดลับเพื่อผลลัพธ์ที่ดีกว่า ใช้ระดับเสียงที่ชัดเจนและเป็นเอกลักษณ์เมื่อร้องเพลงหรือฮัมเพลง หากคุณกำลังแปลงเมโลดี้โน้ตตัวเดียว ให้ทำงานในโหมดโมโนโฟนิกเพื่อหลีกเลี่ยงความสับสนระหว่างโน้ต บีทบ็อกเซอร์หรือนักเพอร์คัสชั่นสามารถใช้เสียงของตนเพื่อกระตุ้นเสียงกลองโดยการตั้งค่าลักษณะเปลี่ยนผ่าน MIDI ที่จะจับคู่เสียงร้องกับเสียงกลองที่เฉพาะเจาะจง ลี่เจียง - 2024/10/57

    voice-to-MIDI converter using Python

    1. **Capture Audio Input**: We'll use a microphone to record the voice input.
    2. **Analyze Audio**: The audio needs to be analyzed for its frequency (pitch detection).
    3. **Convert Frequency to MIDI Notes**: The detected frequency can be mapped to MIDI notes.
    4. **Create MIDI File**: After converting the frequencies to MIDI notes, we can save them in a `.mid` file.
    
    We'll need some Python libraries to accomplish this:
    
    - `sounddevice`: For recording the audio.
    - `numpy` and `scipy`: For working with and analyzing audio signals.
    - `mido`: To create MIDI files.
    - `aubio`: For pitch detection (aubio specializes in audio-to-note detection).
    
    ### Step-by-Step Process
    
    #### Step 1: Install the Required Libraries
    First, we need to install the necessary Python libraries:
    
    ```bash
    pip install sounddevice numpy scipy mido python-rtmidi aubio
    ```
    
    #### Step 2: Capture Audio Input
    
    Here’s how you can capture audio input using `sounddevice`:
    
    ```python
    import sounddevice as sd
    import numpy as np
    
    def record_audio(duration, sample_rate=44100):
        print("Recording...")
        audio = sd.rec(int(duration * sample_rate), samplerate=sample_rate, channels=1, dtype='float32')
        sd.wait()  # Wait until recording is finished
        print("Recording finished.")
        return audio.flatten()
    ```
    
    This function records audio from the microphone for a specified duration.
    
    #### Step 3: Analyze Audio for Pitch (Using `aubio`)
    
    Now, let's detect the pitch of the recorded audio using the `aubio` library:
    
    ```python
    import aubio
    
    def detect_pitch(audio, sample_rate=44100):
        pitch_detector = aubio.pitch("default", 2048, 512, sample_rate)
        pitch_detector.set_unit("Hz")
        pitch_detector.set_silence(-40)  # Adjust silence threshold if needed
        
        pitches = []
        for i in range(0, len(audio), 512):
            sample = audio[i:i + 512]
            pitch = pitch_detector(sample)[0]
            if pitch > 0:  # Only consider non-zero pitch values
                pitches.append(pitch)
        return pitches
    ```
    
    This function processes the audio and detects the pitch at regular intervals.
    
    #### Step 4: Convert Pitch to MIDI Notes
    
    MIDI notes correspond to specific frequencies. We can map detected frequencies to their nearest MIDI note numbers:
    
    ```python
    def frequency_to_midi(frequency):
        if frequency <= 0:
            return None
        midi_note = 69 + 12 * np.log2(frequency / 440.0)  # A4 = 440Hz corresponds to MIDI note 69
        return round(midi_note)
    ```
    
    #### Step 5: Create a MIDI File
    
    We can now convert the detected MIDI notes into a MIDI file using the `mido` library:
    
    ```python
    from mido import MidiFile, MidiTrack, Message
    
    def create_midi_from_pitches(pitches):
        midi_file = MidiFile()
        track = MidiTrack()
        midi_file.tracks.append(track)
        
        # Add some basic track information
        track.append(Message('program_change', program=12, time=0))
        
        # Convert each pitch to a MIDI note and add to the track
        for pitch in pitches:
            midi_note = frequency_to_midi(pitch)
            if midi_note is not None:
                track.append(Message('note_on', note=midi_note, velocity=64, time=100))
                track.append(Message('note_off', note=midi_note, velocity=64, time=200))
        
        return midi_file
    ```
    
    This function takes the detected pitches, converts them to MIDI notes, and creates a MIDI file. The `note_on` and `note_off` events are added to simulate playing and releasing the note.
    
    #### Step 6: Putting It All Together
    
    Now, we can record audio, detect the pitch, convert it to MIDI notes, and save it as a `.mid` file:
    
    ```python
    def voice_to_midi(duration):
        # Step 1: Record audio
        audio = record_audio(duration)
        
        # Step 2: Detect pitch from the recorded audio
        pitches = detect_pitch(audio)
        
        # Step 3: Create a MIDI file from the detected pitches
        midi_file = create_midi_from_pitches(pitches)
        
        # Step 4: Save the MIDI file
        midi_file.save('output.mid')
        print("MIDI file saved as 'output.mid'")
    
    # Record and convert voice to MIDI for 5 seconds
    voice_to_midi(5)
    ```
    
    ### Explanation:
    - **Step 1**: Records audio from your microphone for the given duration.
    - **Step 2**: The recorded audio is split into frames, and each frame is analyzed for its pitch.
    - **Step 3**: The detected pitch is converted to a MIDI note.
    - **Step 4**: A MIDI file is created with `note_on` and `note_off` events for each detected note.
    
    ### Notes:
    - The code is designed for monophonic melodies (i.e., one note at a time). For polyphonic melodies (multiple notes at once), more advanced techniques are required.
    - **Noise sensitivity**: Ensure that the environment is relatively quiet, as background noise can interfere with pitch detection.
    
    This script should give you a basic starting point for voice-to-MIDI conversion in Python.
    

    離蒄-柔音美景@Youtube
    . email: [email protected]
    
    T:0000
    資訊與搜尋 | 回music首頁
    email: Yan Sa [email protected] Line: 阿央
    電話: 02-27566655 ,03-5924828