waveform component example

Home Forums General Panels, Components, Macros waveform component example

Viewing 20 posts - 1 through 20 (of 32 total)
  • Author
    Posts
  • #9121
    msepsis
    Participant
    • Topics: 219
    • Replies: 732
    • Total: 951
    • ★★★

    Hi atom, I know you worked diligently at this a while back and got it working with your dave smith synth, but you still have not released your methods on how to get data which ctrlr can use. Would it be possible to put up or PM me an example panel using the waveform component that will demonstrate the methods which can get waveform information (from a file – wav, mp3, aif, etc) to a synth?

    Here’s a link to the manual for the synth I’m deving this functionality for: https://www.dropbox.com/s/ncdh7m0tue4zh7g/MicrowaveXT.pdf
    It’s the WDATA formula (s 3.4) on page 114 that deals with how the synth packs, sends and receives WDATA.

    On the XT/XTk a wave consists of 128 8 bit samples, but only the first 64 are stored/transmitted. The last 64 bits are simply a mirror image along the 0 crossing of the x and y axis … see attached image.

    I’ve used a custom component and honestly would rather stick with using it as I have everything working, so maybe you might be able to make an example which allows you to import a waveform to be rendered on a custom component, where it can be edited/drawn on as I have my elements working at the moment. I’m able to use the custom component to load waveforms from the synth’s memory and render them on the custom component where the user can click drag to edit the waveform, then send the edited waveform back to the synth. I have all this working.

    I really just need the methods to:

    1. load a waveform from a file
    2. -Convert waveform to 8 bit mono (one channel) by either combining right and left channels or by taking either right or left channel…
      -Forget anything past the first 64 samples of the waveform.. only load in the first 64 samples of the waveform…

    3. draw/render the waveform at a 1:4 ratio onto a custom component (one byte equals 4 pixels)

    (edited several times for clarity)

    • This topic was modified 9 years, 2 months ago by msepsis.
    • This topic was modified 9 years, 2 months ago by msepsis.
    • This topic was modified 9 years, 2 months ago by msepsis.
    • This topic was modified 9 years, 2 months ago by msepsis.
    • This topic was modified 9 years, 2 months ago by msepsis.
    • This topic was modified 9 years, 2 months ago by msepsis.
    Attachments:
    You must be logged in to view attached files.

    Monstrum Media | Music, Sound & Software Design, Chicago / San Francisco listen

    #9142
    atom
    Keymaster
    • Topics: 159
    • Replies: 2945
    • Total: 3104
    • ★★★★★

    I’ll try to cook something up. Something that’s based on different WAV type files (stereo/mono different bit depths and samplerates)

    #9144
    msepsis
    Participant
    • Topics: 219
    • Replies: 732
    • Total: 951
    • ★★★

    cool. Thanks atom. For me a priority is still to get resources working on an os x exported standalone/vst/au instance but if you have time while you’re still waiting for parts to fix your hackintosh then it’d be great to get some examples for these needed methods.

    On that note… my offer STILL stands to donate to you an actual mac – macBookPro… I have three retired MBPs I could ship you if you’d just pm me your mailing address. I know you hate donations… and you hate apple… but these oldish (5 years old) MBPs are doing absolutely nothing but collecting just here.

    Monstrum Media | Music, Sound & Software Design, Chicago / San Francisco listen

    #9145
    msepsis
    Participant
    • Topics: 219
    • Replies: 732
    • Total: 951
    • ★★★

    of course id only be donating one mbp.. Meant to state it differently. I have three mbps that are about to get E-cycled. I’d much much rather just donate one of them to YOU since you have no mac..

    Monstrum Media | Music, Sound & Software Design, Chicago / San Francisco listen

    #9200
    atom
    Keymaster
    • Topics: 159
    • Replies: 2945
    • Total: 3104
    • ★★★★★

    I had a quick look at this.

    Would it help if i made the AudioThumbnail class avilable directly ? It’s a utility class that handles audio formats and helps drawing the representation of that audio format on a Graphics context (the same one that is used when drawin the custom components). Here is the manual http://rawmaterialsoftware.com/juce/api/classAudioThumbnail.html

    This method is used by the Waveform component, but i didn’t made the class itself available. But i will.

    You can draw only one channel with it, and you can pass in the samples you want to it by using addBlock(). You can also scale the drawing by containing it in a rectangle and specifying the vertical zoom factor.

    Will that help ?

    #9220
    msepsis
    Participant
    • Topics: 219
    • Replies: 732
    • Total: 951
    • ★★★

    well it’s not as much about drawing the wav file as much as it is about getting 64 8 bit hex values from the wave/aif file which I can then send to the synth per the microwave’s WDATA format as I referenced. If you can get me there It’d be most helpful.

    Monstrum Media | Music, Sound & Software Design, Chicago / San Francisco listen

    #9239
    atom
    Keymaster
    • Topics: 159
    • Replies: 2945
    • Total: 3104
    • ★★★★★

    That should be very simple i’ll post an example soon.

    #9275
    atom
    Keymaster
    • Topics: 159
    • Replies: 2945
    • Total: 3104
    • ★★★★★

    I’ve added an example that might help to the Panels directory, it works with the latest nightly.

    #9347
    msepsis
    Participant
    • Topics: 219
    • Replies: 732
    • Total: 951
    • ★★★

    Thanks Atom, I haven’t looked at this yet but will the example work with the latest mac nightly? Most of the users of this panel (75%) are running OS X.

    Monstrum Media | Music, Sound & Software Design, Chicago / San Francisco listen

    #9368
    atom
    Keymaster
    • Topics: 159
    • Replies: 2945
    • Total: 3104
    • ★★★★★

    Yeah i know. Yesterday i installed OSX on my Revodrive i hoped that this will fix my main problem but it didn’t. But i’ll try to do a build anyway.

    #9375
    msepsis
    Participant
    • Topics: 219
    • Replies: 732
    • Total: 951
    • ★★★

    cool. if you provided me with the source would It be something I could build for you? Just PM me with any details and instructions. The other thing We’re talking about in PM is in progress. I’ll keep you posted 🙂

    Monstrum Media | Music, Sound & Software Design, Chicago / San Francisco listen

    #9376
    atom
    Keymaster
    • Topics: 159
    • Replies: 2945
    • Total: 3104
    • ★★★★★

    That’s the problem. Unless you know XCode very well and all the little stuff Apple keeps changing with every version you are fucked. Even Jules@JUCE keeps getting error reports when new XCode comes out, there is always something wrong. I’ll see what i can do today, it’s a free day tomorrow in Poland so i’ll have some free time on my hands.

    #9387
    msepsis
    Participant
    • Topics: 219
    • Replies: 732
    • Total: 951
    • ★★★

    Thanks so much for the 1412 rev!

    take a peak at this demo video I made of my wavetable/waveform editor:

    [edit: the left and right sides of the video here get cropped when played through this forum, to really see what’s going on there i recommend viewing it through youtube.]

    Since the waveform component in ctrlr is not yet capable of allowing you to draw the waveform I had created a custom component that displayed any waveform on the synth and also wrote scripts that allow you to redraw over the waveform using mouse down and mouse drag scripts. So.. what I’d like to do is be able to load a waveform from a file to be displayed/visualized in my DIY custom component waveform. Obviously there is no right click, load waveform option on custom components. Suggestions for getting from here to there?

    I need some methods that will allow me to load a wave file after clicking a button and then give me the first 64 samples of the file as hex values. I then will take those hex values and plot them in my custom component which I created as a waveform editor.

    thanks so much

    • This reply was modified 9 years, 2 months ago by msepsis.

    Monstrum Media | Music, Sound & Software Design, Chicago / San Francisco listen

    #9398
    atom
    Keymaster
    • Topics: 159
    • Replies: 2945
    • Total: 3104
    • ★★★★★

    As far as reading the file, and getting the sample in 8 bit form, i added an example to the Panels directory in Ctrlr, check that out.

    For drawing waveforms there is a AudioTHumbnail class that might help you with that. If you want “drawing” i’m afraid for now you need to do that on your own. And you can do a “right click->menu->load file” in a custom component all callbacks are there, the PopupMenu class is there so there is nothing stopping you.

    #9400
    msepsis
    Participant
    • Topics: 219
    • Replies: 732
    • Total: 951
    • ★★★

    Just to be sure I’m understanding you fully…

    As far as reading the file, and getting the sample in 8 bit form, i added an example to the Panels directory in Ctrlr, check that out.

    are you referring to the example in 1412? I saw that. very cool. The convert to hex button doesn’t seem to work right when i load in external wav files from my hd then hit “convert”. I’m home all day so I’ll look at this a bit more.

    For drawing waveforms there is a AudioTHumbnail class that might help you with that.
    If you want “drawing” i’m afraid for now you need to do that on your own.

    Did you see the video? I’ve got scripts that draw the waveforms from the synth, and scripts that draw over the original waveform when the user clicks then drags within the custom component.

    And you can do a “right click->menu->load file” in a custom component all callbacks are there, the PopupMenu class is there so there is nothing stopping you.

    sorry atom, Im not getitng anything if i right click in a custom component. Maybe i should connect and fire up my win xp box? right clicking on my custom component does not bring up any menus on the latest os x nightly 1412. am i missing something?

    • This reply was modified 9 years, 2 months ago by msepsis.

    Monstrum Media | Music, Sound & Software Design, Chicago / San Francisco listen

    #9404
    atom
    Keymaster
    • Topics: 159
    • Replies: 2945
    • Total: 3104
    • ★★★★★

    Well nothing will happen on right click, you need to set the lua method for “Mouse down” in the component properties and show the PoupMenu from there.

    How do you load “external wav files?”, you need to add them as resources, what does not work, nothing shows up or some bogus data appears ?

    #9405
    msepsis
    Participant
    • Topics: 219
    • Replies: 732
    • Total: 951
    • ★★★

    How do you load “external wav files?”, you need to add them as resources, what does not work, nothing shows up or some bogus data appears ?

    ahh.. I was using the right click menu on the uiWaveform component. but yes i saw those four waveforms in the resource panel for the demo panel.. I’ll try that out.

    Monstrum Media | Music, Sound & Software Design, Chicago / San Francisco listen

    #9427
    Hecticcc
    Participant
    • Topics: 25
    • Replies: 160
    • Total: 185
    • ★★

    This new component is awesome, it will make a nice addition for being able to shuffle short samples into samplers using smidi, and turn my Emu sampler into a ppg on crack 🙂

    #9488
    msepsis
    Participant
    • Topics: 219
    • Replies: 732
    • Total: 951
    • ★★★

    I agree it is awesome. Atom would it be possible for you to modify this example, or provide details here on how to get that demo panel to be able to convert waveforms loaded into your example’s uiWaveform via the right click menu?

    I think you misunderstood me a few posts ago on how to get this to work when you right click. you said “nothing will happen…” I was referring to right clicking on the uiWaveform in your example. I’m definitely able to load a waveform but hitting the convert button does nothing.

    Monstrum Media | Music, Sound & Software Design, Chicago / San Francisco listen

    #9493
    atom
    Keymaster
    • Topics: 159
    • Replies: 2945
    • Total: 3104
    • ★★★★★

    Sure that’s also possible, i’ll add that.

Viewing 20 posts - 1 through 20 (of 32 total)
  • The forum ‘Panels, Components, Macros’ is closed to new topics and replies.
There is currently 0 users and 57 guests online
No users are currently active
Forum Statistics
Threads: 2,495, Posts: 17,374, Members: 77,605
Most users ever online was 12 on January 22, 2019 3:47 pm
Ctrlr