Constant Audio - Tape/Vinyl Emulation
-
@trillbilly You'll necessarily have to trigger a MIDI note somewhere in your code, like in a button callback...
Synth.addNoteOn
andSynth.addNoteOff
are what you need. -
@ustk forgive me, I'm not at my computer.
So I could do a button callback that is linked to a specific midi number? When this button is engaged, it would turn the audio on and disengaged turns the audio off.
This sounds like it could be just done in a sampler then? And I could just use the "combobox Preset window" to switch sample maps to change the sound.
I'll be back in the studio tonight to do some trial and error. I appreciate it!
-
@trillbilly Yep, just do this:
inline function onButton1Control(component, value) { if (value) Synth.addNoteOn(1, 60, 60, 0); else Synth.addNoteOff(1, 60, 0); }; Content.getComponent("Button1").setControlCallback(onButton1Control);
HiseSnippet 1090.3oc6X07iaSDEebRl15.rhVUgfaVUbHKprD2VVPpGZ17UUDa1M6lkJPpRUyZ+Rxnc7LF6waaDpnJDG4.h+M3L24+H3NGfYrchcZMgfKezUhHsqx6Mu2L+l2626MyjQABGHLTDfLLOYtOfLdc734b4rNyHTNZPWjwV3gjPIDXknp8beRXH3hLLpdesBCyZn3O+x8ZSXDtCjoBgdff5.6S8nxLsiZ8ITFqOwENg5ky56zZfif2QvDQJ7TE2D4SbNiLENfnMqBFYbodtToHXrjHgPjQs1B24imIdLOw9GPComx.sfMZrZhRT2Wvb0HV+cTmYTl6nE66PDx.OJKJTMIJbc7PpKco9rnwaFOfUlG4iGFUVG7rKI7LxAuZIv6p3wNATeY1HZr8Z3AbUhZBQkBxCqDaQU9dCbGgxBtbGOxYP+.kvROZrayl2zR8usua850obFkCVSh3NRpfaI3sijRA2VOAABVCGgmufqlpaZcNgEAaW+KqaRmX0HUxzLlFsCw08.gDNj2vVO6I+oWCSfEBufYSlrvNsMO8t0W.3ofryhkrwMRAyM1dmPs9XH0gvXmp3KMddrplnb6iTzDi25Ost0yOjBAEMV5bwffBGVSjCVmiM3QdmBA4iVZCUYzUoLWZynLNIgkbFJ3C3T4g9PpbFoxt.REJMtpoWoHTYpLlbsUJ4JIJhnpIwDmFRQwvOeAN5SGzkHIKlH0bpVGeHPR0aGitv4pF.IrVSbWH7LovO11zjIx3xavx9jkK4yHslms9tsdL0UNSUCarqABMCnSmI0ResZPI7DotpXz9684ev3SNbjp0yKTJoJnEtQLhb0pbcqszAT4wUJmzkL7Ppbd9Ve+EJ8aVXoegYoMDtWEOhJclULdqT.dUYq+owaZiz2.2axDvQlA1Z39eVY6ZVNnbkDnbY7ABZHDChqk7cq6CbHPGLs+iNX6m90u5G1zC1723C1LpVpSJVkUly9BN1n1+Amp82O09kuRr5lA2+jCdMWfwwTOeFzieNvTs4RIScgIjHlbg1UISCEbg+LAm5jm+bLHCnSmBA4wdgan8jR0wZYZtdqiAFPByQvd2V6qNtlDnhSPIiE1adrXc4q2Fm.WKcEf0+2A8UsNnk7dmoz+qgGIXySHy8oL0UGiAjINQvdMuN.g5G.eQDvcxhhe2O15nEBa+ve9dqReeuVGEQXYQ8m8vu8a1qM0WvHAaTFo7r8ZaHs4svK2TWj355LyEG79N3zjtkNXewA2agO5U.vdrHRR4SGRTG2ntEM9fHuwpqg3.Jfx4pGgousbE8KBRjapk0.ZLvciE9M0mzAs0xFoCZuXv+UVCOhSf3QNIuUQWidkXMp8MO9WGvDOTKas7IJXbycZh7T2q4QNN5lluuJ9TrO2pD9b6R3ycJgOeXI7Y2R3yGUBe9305i9Jk6EIEdI7ekhQ8hepngQONQwjiKEP+N2K77B.
-
@ustk could a timer start the NoteOn without the user having to actually click anything?
-
-
@danh Yes. Also if the button is saved in preset it could also start the note as soon as the preset is loaded.
-
-
@ustk super appreciate you! Thanks for this
-
@trillbilly If you want it to play or not depending on the selected preset then a button is the choice to make
-
-
-
@ustk I've got it close to working. It is indeed turning the Noise FX on and off, but it is also effecting all other sampler. When I turn the button on and off, it turns each sampler on and off, not just the one generating the noise.
Here is how I have is coded:
const var Sampler5 = Synth.getSampler("Sampler5"); inline function onButton1Control(component, value) { if (value) Synth.addNoteOn(1, 60, 60, 0); else Synth.addNoteOff(1, 60, 0); }; Content.getComponent("Button1").setControlCallback(onButton1Control);
Am I missing something to control only "Sampler 5" with this funtion?
-
@trillbilly said in Constant Audio - Tape/Vinyl Emulation:
@ustk I've got it close to working. It is indeed turning the Noise FX on and off, but it is also effecting all other sampler. When I turn the button on and off, it turns each sampler on and off, not just the one generating the noise.
Here is how I have is coded:
const var Sampler5 = Synth.getSampler("Sampler5"); inline function onButton1Control(component, value) { if (value) Synth.addNoteOn(1, 60, 60, 0); else Synth.addNoteOff(1, 60, 0); }; Content.getComponent("Button1").setControlCallback(onButton1Control);
Am I missing something to control only "Sampler 5" with this funtion?
you need to put this in a Script processor attached to Sampler 5
-
@lindon Thanks, I got it working just after I posted.
Now my issue is only allowing Noise FX samplemaps show in the NoiseFX Combobox. Right now, it shows all samplemaps for all Samplers.
Is there a way to tell HISE which samplemaps to load in a particular combobox?
-
@trillbilly you need to filter the samplemaps using some string operations. It will be easier if you name properly your samplemaps. then you can filter with "if samplemap name contains NOISE", or whatever you want.
-
@ustk Yes, I have all the sample maps for noise lead with NSE. Im out of the studio today but I will get back to this tomorrow and see if I can figure it out.
Thanks again!
-
@ustk I guess Im a bit confused how the "If" function works. Should I be adding it directly beneath wear I am calling for the samplemaps list?
Here is my original code:
inline function onNoisecmboxControl(component, value) { Sampler1.loadSampleMap(sampleMaps[value-1]); }; Content.getComponent("Noisecmbox").setControlCallback(onNoisecmboxControl);
I've messed around with various "If" functions directly below "Sampler1" and have had no success. Where am I going wrong? Should I be doing a separate callback to the "Noisecmbox" ?