I am interested in training a generative model on my guitar's waveform, but not sure how to record a waveform dataset from it.

I have transducer pick-ups on my acoustic (which would be ideal to use) but not sure hack it to

  • 2
    sound.stackexchange.com would be a more appropriate place for this question.
    – Mark
    Oct 19, 2019 at 0:17
  • Step 1 is recording an audio file (lots of resources for this part). Step 2 you need to extract the raw samples in the form needed by your other software (also lots of resources for this, but need to know the exact format needed by your other software). Oct 19, 2019 at 17:58
  • I've done something similar to this with an Arduino Due and some simple circuitry to create a guitar pedal. Have a look at something like this and modify it to output the guitar's input to a RaspPi or something: instructables.com/id/Arduino-Guitar-Pedal Oct 22, 2019 at 14:16

2 Answers 2


The easiest way to do this is probably to use an audio interface. An audio interface lets you plug in a 1/4" jack and connect the interface to your computer using USB. The interface can convert analog to digital signal, and vice versa.

It looks something like this.


Here's some ipython notebooks that stream an audio waveform from a soundcard into matplotlib for a real-time viz.

It uses PyAudio and struct (to uncompress the byte stream into waveform integers)


sound.stackexchange.com sounds more appropriate for me going forward, thanks for the rec!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.