Scratchr - Vinyl Scratch emulation attempt
-
Hi everyone.
Yesterday a friend asked for a plugin that emulates vinyl scratching. He needed to load samples and 'scratch' them and have control on the amount and speed.
I made a simpe plugin for him which kind of emulates the process. Uses audio player to load and play samples, Modulation wheel to control pitch/speed, has loop, reverse buttons and two sliders that set MW range and a control one that user can assign to any CC.It kinda works but it would be much better if the play direction of the sample can be switched in accordance to MW/controller motion - that is, if controller goes up the sample plays forweard and if ctrl goes down the sample play goes reverse. But, dunno how to do that! :)
-
-
@musictop unfortunately it is crashing as soon as I click Reverse .
-
@musictop I made an attempt to solve that, it is possible to reverse the audio in real time, in this example I use the Pitch wheel, so bending up will increase the speed & it will play forward, bending down will also increase speed & it will play reversed.
The issue here is that when going from forward => reversed, or vice versa, the playhead will start to play where it was but counting from the end of the file 🤭Lets say the sample i 4 sec long, when playhead is at 1 sec, and you reverse the play direction, it will start playing from 1 sec counted from the end of the sample.
So if you could get like Sample.CurrentValue it would work to reverse at the right position in the sample.
I could not find any function for that in the documentation, and I asked the question in the forum so maybe there is a way I hope :) -
@ulrik Oh, and here is the snippet:
this has been edited, I posted the wrong snippet.
//
Edited again, came up with a better snippet, takes the amount of pitch in accountHiseSnippet 2903.3oc6as0aaibElx1zIVwNMIqSugV.hf9fbSVaRcihcSVSaYYGgHaIHImz9PgBE0HoYMEoJIkSbtflVze.8ePK5Of19SHO1Gyi6it+C1m6KoyLjTbH0MZC6jcytL.FgyMd9NmybtLyQULMTAVVFlLwVp9I8ALwVls1I51cy2UApyTbGlXWi0R0TwVsqo.y1mzWwxBzhIVr42COfXKs.C44a1baEMEcUfeSLLO1.pBJA6As8ash7ifZZ6pzBTG1iZzokKpZnm2PyX.hXlmkmouh5QJc.GnfG1brLwVrPKnsgYMaEafESrE11n0I05Z7Lcmw+XnEroF.+h.SMzB4z7tFZsvTLtUl7cgZsp3AZKFzhVwmELuCKXU18gsfCa2mUbCRGb9yfleDatoQdBzjGezIuXTj2BNj2MYqoZB6a62iiXpntMvrsBRDPS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0zngpilKd66UIsf3s5tUOy9324FVI3rr7qyiuvaXCUUrH8yEXXF+bRdNlSpywbReNlSlywbxdNli34XN4l5bvw1r0.aidNV1cKpZ2SaI10negMlbvclz+njHeK2ZiyQYvMpNemBjn57qrfcGnoMxXvMFZb0NB7rvwAXhfDtsWt5+bu+6K9KaN7mOyDtndZS3L6WofiE7XCCuF05+GHsou3N
-
@musictop btw, you had a lot of Component ID's with spaces in their names, if you have spaces it's not possible to make references to the components, so I made underscores where you had spaces.
And you have to set "sampleIndex" in the Property Editor for your Player1, to something else then -1, I changed that to "0" now
-
@ulrik very cool work and thanks a lot for advices!