Waveforms on OLED


#1

So I just ordered two small OLED screens to display patch names, but I wanted to know if I could display an entire samples waveform like how it would be shown in a regular DAW. Beyond that, if it would be possible to visually see the start and end times of the sample. The dream would be to turn the axoloti into a robust sampler for chopping samples. Any help would be greatly appreciated, I want to know if this is possible before I create a bunch of work for myself


#2

nope that is not possible as of now. you can display a scope with @SmashedTransistors objects, but not a waveform preview


#3

would I be able to send the waveform preview to an external device like an arduino or raspberry pi? or would I be better off exploring other platforms for this project? I am not well informed what all the gpio options can achieve so I don't really know if pairing the axoloti with another microcontroller would be worth it


#4

The I2C OLEDs are very small and low res (128x64).
I don't think they can be used for "DAW grade" sample edition.


#5

I think it’s a better idea to use Arduino or Pi type boards to power displays. Axoloti’s precious resources need to be reserved for the critical task of processing audio. Fortunately, getting Axoloti and Arduino to talk together is very easy. Several methods are suggested in this forum. You can utilize I2C, SPI, UART and MIDI.

For me the easiest way is USB MIDI. All you need to do is connect the USB host plug on Axoloti to an Arduino usb plug. Axoloti sees Arduino as a MIDI device and it can power it too. You need a USB midi library on Arduino of course. On Axoloti you can create MIDI Sysex messages that can hold the “wave form representation”

The more challenging part would be preparing and sending that representation. I haven’t done this myself but I’d start with a K-rate envelop follower object and try to reduce its sample rate to around every 10 K-rate pulses (300Hz or less). Then I would save the results in a numerical array. i might use singed integers to be able to represent the bipolar nature of wave forms. after that I would need to find a way to parse and encapsulate this information in a stream of Sysex messages and transmit those to the other MCU. I’d probably to this conversion in chunks (every seconds of audio for example) and then transmit each chunk and free up it’s memory before converting next chunk. I’d do this because I don’t want to overflow Axoloti’s Ram with huge arrays. Additionally, I could save these “waveform representations” along side my actual wave files on Axoloti’s SD card so this conversion process is only performed once when the wave file is loaded for the first time.

An Arduino needs to be powerful enough to be able to interpret and draw this data on a display. Maybe Pi or Arm based board would be a better choice here.That would be a very interesting project! Let us know if you come up with something. :+1:


#6

Thanks so much for the advice! I have an arduino on the way already but I'll look into others while I wait. I will post how/if my patch works when I get to really try it out.


#7

I still have an oldschool Sampler and it doesn't show waveform. it just uses numbers.. that combined with encoders + my ears makes me not miss the display at all.. I actually don't trust as much when I edit a waveform in software as one milimeter gap in the screen could be 2 milisecs or 3 seconds depending on the lenght of the sample itself..