Is it possible to play back MP3 files with the sampler? (Yes, not pro audio customs, I know)
I noted the JUCE_USE_MP3AUDIOFORMAT flag and turning that on makes it possible to load, see the waveform and everything, but playback is quiet?
Posts
-
MP3 playback
-
RE: Timestretching/Pitchshifting
@Christoph-Hart Sample start mod is not possible, right?
-
RE: Timestretching/Pitchshifting
@d-healey Pulled the branch yesterday and everything else is there but I'm getting function not found both with getSampler and getChildSynth
-
RE: Timestretching/Pitchshifting
@Christoph-Hart Nice! Is getTimestretchOptions() not implemented yet?
-
RE: Timestretching/Pitchshifting
@Christoph-Hart Very cool! Where can we poke around to lower the limit? And is there a way to reach the stretch ratio of the Sampler module via scripting ?
-
RE: Value output from scriptnode
@Christoph-Hart You're a legend man, thanks. Having a lot of fun with this. Have a great weekend!
-
RE: Value output from scriptnode
@Christoph-Hart Worked with the latest develop branch! Thank you so much for the input. It sounds like the update rate is waaay higher? Typically a good thing I guess, but I'm experimenting with sample start modulation and getting a very different sound from the asynchronous one (pretty cool but not what I'm after).
Is there a way to limit it somehow so it doesn't update quite as frequently? Tried throwing the global cable in a fix256 block as a wild guess but that didn't do anything. -
RE: Value output from scriptnode
@Christoph-Hart Ah that's probably it then! Develop but a March build
-
RE: Value output from scriptnode
@Christoph-Hart Thanks for the explanation! Why doesn't it ever update when it's set to synchronous though?
-
RE: Value output from scriptnode
Got this to work and it works fine in HISE, but on a compiled plugin it doesn't seem to trigger the callback when the UI is closed. @DanH I saw you were messing with the global cables a while back too, did you get it to work out?
@Christoph-Hart Are global cables only good for changing visual things in the UI and is there a better approach for this?
In my example it's of course an unnecessary way of modulating the saturation through scriptnode, but there is all types of fun to be had with making more complex modulation signals with scriptnode and using those with outside processors, so I'm dying to know if I'm using it in the wrong way and if there is a way around it or if there is a better practice to achieve my desires...
HiseSnippet 1790.3oc6Y07aaTDEeVaOtXmRghpJbbUDGbkBVwPofTAEm37AQTmZEmlxspI6NwYj2cmkYGmDCh68Fhi8VOwe.bCt.+IfD23.Ggq8DWKuY1c8tq85z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4ken7aiS1E+GHR9kQw1dUYMbIVB9ihdVtxm+ZZIfs0S+O3qBtspsYCzggWrBqJuGxEND7QVVpLr2C7A4qy6OC57AyfN2dFz4CmActyLnyGMC57wmnNp6eD8.NUNFHnyZg0IyXMOcUTUoan+A7H+YDK
-
Value output from scriptnode
Is it possible to return a value from scriptnode? Let's say for example you have an envelope follower that modulates a knob, and you want that value to update something in the UI to animate or pass on to other processors?
-
RE: Active notes check/Voice distribution
@ustk Certainly much leaner, thanks for that!
-
RE: Active notes check/Voice distribution
@d-healey Care to give a quick example? :)
-
RE: Active notes check/Voice distribution
@d-healey Right now I have 6 synths, and that's a good question. Do you drop off the first note played, the last note played, or the note closest to the last note played...
I managed to solve it in another way by adding MIDI channel filters to each channel and managing the rest from the interface script. Maybe not the prettiest solution but it works!
onInit reg voice1play = -99; reg voice2play = -99; reg voice3play = -99; reg voice4play = -99; reg voice5play = -99; reg voice6play = -99; reg note = -99; reg lastNote = -99; reg lastVoice = -99; reg eventId0 = -99; reg eventId1 = -99; reg eventId2 = -99; reg eventId3 = -99; reg eventId4 = -99; reg eventId5 = -99; function onNoteOn() { Message.ignoreEvent(true); note = Message.getNoteNumber(); if(!Synth.isArtificialEventActive(eventId0) && Synth.getNumPressedKeys() < 7) { eventId0 = Synth.playNoteWithStartOffset(1, note, 127, 0); voice1play = note; lastVoice = 1; Console.print(Synth.isArtificialEventActive(eventId0)); } else if(!Synth.isArtificialEventActive(eventId1) && Synth.getNumPressedKeys() < 7) { eventId1 = Synth.playNoteWithStartOffset(2, note, 127, 0); voice2play = note; lastVoice = 2; } else if(!Synth.isArtificialEventActive(eventId2) && Synth.getNumPressedKeys() < 7) { eventId2 = Synth.playNoteWithStartOffset(3, note, 127, 0); voice3play = note; lastVoice = 3; } else if(!Synth.isArtificialEventActive(eventId3) && Synth.getNumPressedKeys() < 7) { eventId3 = Synth.playNoteWithStartOffset(4, note, 127, 0); voice4play = note; lastVoice = 4; } else if(!Synth.isArtificialEventActive(eventId4) && Synth.getNumPressedKeys() < 7) { eventId4 = Synth.playNoteWithStartOffset(5, note, 127, 0); voice5play = note; lastVoice = 5; } else if(!Synth.isArtificialEventActive(eventId5) && Synth.getNumPressedKeys() < 7) { eventId5 = Synth.playNoteWithStartOffset(6, note, 127, 0); voice6play = note; lastVoice = 6; } } function onNoteOff() { if(Message.getNoteNumber() == voice1play) { Synth.noteOffByEventId(eventId0); voice1play = -99; } if(Message.getNoteNumber() == voice2play) { Synth.noteOffByEventId(eventId1); voice2play = -99; } if(Message.getNoteNumber() == voice3play) { Synth.noteOffByEventId(eventId2); voice3play = -99; } if(Message.getNoteNumber() == voice4play) { Synth.noteOffByEventId(eventId3); voice4play = -99; } if(Message.getNoteNumber() == voice5play) { Synth.noteOffByEventId(eventId4); voice5play = -99; } if(Message.getNoteNumber() == voice6play) { Synth.noteOffByEventId(eventId5); voice6play = -99; } note = -99;
-
RE: Active notes check/Voice distribution
@d-healey Nothing wrong with it, I didn't know it existed :) I'm realizing it doesn't help with my problem of managing the voice distribution though.
-
RE: Active notes check/Voice distribution
Also, my solution sucks right now because it's not keeping track of which synths are free to play.. Synth1 will only play if no notes are playing, Synth2 will only play if one note is playing etc.
-
Active notes check/Voice distribution
Is there any way to check exactly how many notes are being played?
I'm experimenting with triggering multiple single-voiced synths and need to find the best way to distribute the notes across them.
My hacky solution now KINDA works but quickly messes up the voice count, especially if you play it quicker than... Really slow.
I have a global in the interface script (I know, globals are the devil, don't remember why):
global activeNotes = 0;
And one script processor for each synth:
onInit reg eventId1 = -99; reg note = -99; onNoteOn function onNoteOn() { Message.ignoreEvent(true); if (activeNotes == 0) //== 1, 2, 3 etc. for other script processors { note = Message.getNoteNumber(); eventId1 = Synth.playNote(note, 127); activeNotes = activeNotes + 1; } } onNoteOff function onNoteOff() { if(Message.getNoteNumber() == note && Synth.isSustainPedalDown() == false) { Synth.noteOffByEventId(eventId1); eventId1 = -99; note = -99; activeNotes = activeNotes - 1; } }
Like I said it kinda works but loses count if you play multiple notes in rapid succession.
So if synth1 is already taking care of the first active note, synth2 plays the next one. Is there a more solid way to approach this?
-
RE: Get length / duration of sample in samples
@d-healey Do you know if there is a way to do this now? Just like you said the sample length is overwritten whenever SampleStart or SampleEnd is changed and I can't find a way to get at the original sample length. Even when loading custom samples I can't really figure out how to snatch it before initAfterSampleLoad() which is called every time the sample is updated.
I'm drawing on a panel on top of an AudioWaveform and need to find a way to calculate the relative position and size of the selected range within the total view. Resize the panel to only cover the selected range in other words.
Figured one way to do it was to work with the AudioWaveform, but getRangeStart() and getRangeEnd() return 0.
-
Update timer interval while running?
Is there a way to update the interval of a synth timer without stopping it, while it's already running?