(partially) physically modelled handpan/Rav drum

All your LV2 and LADSPA goodness and more.

Moderators: khz, MattKingUSA

Post Reply
jeanette_c
Established Member
Posts: 447
Joined: Tue May 12, 2020 5:53 pm
Has thanked: 156 times
Been thanked: 120 times

(partially) physically modelled handpan/Rav drum

Post by jeanette_c »

Hey hey, I have just released this software instrument:
http://juliencoder.de/sound/handpan-1.0.zip
It's implemented in Csound. The file as it comes will run on Linux with ALSA audio out and ALSA sequencer MIDI. But all choices are given at the top. It also supports any equally tempered scale you like. Two scales are shown in the file. Only one scale will be active.
It was tested with Csound 6.16, but should work with 6.15 or even 6.14. To run it, just type:
csound handpan.csd
To quit press control+c.
If you play notes not within the scale, you strike the resonator, i.e. anything that is not a clean note. If you turn the modwheel (MIDI CC 1) beyond half way you will get a different strike sound, more like knocking on the instrument.
Everything you might want to change or adapt to taste is at the top and well commented.
Best wishes and enjoy, Jeanette
--
distro: ArchLinux, DAW: Nama, MIDI sequencer: Midish
All my latest music on https://www.youtube.com/channel/UCMS4rf ... 7jhC1Jnv7g
Albums, patches and Csound on http://juliencoder.de
User avatar
sysrqer
Established Member
Posts: 2143
Joined: Thu Nov 14, 2013 11:47 pm
Has thanked: 80 times
Been thanked: 36 times
Contact:

Re: (partially) physically modelled handpan/Rav drum

Post by sysrqer »

Hi Jeanette, I'm really interested to try this out. I'm not really sure what's happening though and I can't get any sound. It looks to start ok from the terminal output, I can see it in qjackctl's patch graph, I can connect my midi controller to it, but I get no sound and it doesn't appear as an audio output in the qjackctl graph. I'm not really sure what I'm doing wrong. This is the output I get (I've trimmed it so it doesn't take forever if you're on a screen reader):

Code: Select all

time resolution is 1000.000 ns
0dBFS level = 32768.0
--Csound version 6.13 beta (double samples) 2020-02-10
[commit: none]
libsndfile-1.0.28
UnifiedCSD:  handpan.csd
STARTING FILE
Creating options
Creating orchestra
closing tag
Creating score
rtaudio: ALSA module enabled
instr Strike uses instrument number 1
instr Tine uses instrument number 2
instr Resonator uses instrument number 3
instr Setup uses instrument number 4
sorting score ...
        ... done
midi channel 1 using instr 1
(repeat up to channel 16)
displays suppressed
0dBFS level = 1.0
ftable 101:
chnl 1 using instr 1
MIDI channel 2 muted
(repeat up to channel 6)
ALSASEQ: opened MIDI input sequencer
ALSASEQ: created input port 'Csound' 129:0
ALSASEQ: connection failed from a, port 0 (Operation not permitted)
orch now loaded
audio buffered in 256 sample-frame blocks
ALSA output: total buffer size: 1024, period size: 256
writing 512 sample blks of 64-bit floats to dac
SECTION 1:
new alloc for instr Setup:
new alloc for instr Tine:
(repeat lots of times)
jeanette_c
Established Member
Posts: 447
Joined: Tue May 12, 2020 5:53 pm
Has thanked: 156 times
Been thanked: 120 times

Re: (partially) physically modelled handpan/Rav drum

Post by jeanette_c »

Hi @sysrqer ,
first I made a little slip, which is not much of an issue for you. I use -Ma which does not work for alsaseq. That means Csound can't autoconnect the MIDI ports.
Then Csound uses alsa audio out. Do you have jack running? If so, best go into the file and put a semicolon on the line
-+rtaudio=alsa
and remove the semicolon from the line
;-+rtaudio=jack
Also if you use a samplerate different from 48kHz go to the line
sr = 48000
and change it.
I just checked with the -=rtaudio=jack and it works. I have the JACK plugin running from ALSA, so I didn't think.
I hope this works, if not, let me know. I'd love to have this as ready as can be.
--
distro: ArchLinux, DAW: Nama, MIDI sequencer: Midish
All my latest music on https://www.youtube.com/channel/UCMS4rf ... 7jhC1Jnv7g
Albums, patches and Csound on http://juliencoder.de
jeanette_c
Established Member
Posts: 447
Joined: Tue May 12, 2020 5:53 pm
Has thanked: 156 times
Been thanked: 120 times

Re: (partially) physically modelled handpan/Rav drum

Post by jeanette_c »

Version 2 is now available, with a better README and instruction on how to setup and customise the instrument. The instrument now also has definitions for all the scales - if not all keys - listed on the Rav Drum website for both the Rav Vast (tongue drums) and the more traditional Rav Pans (handpans).
http://juliencoder.de/sound/handpan-2.0.zip
Share and enjoy, Jeanette
--
distro: ArchLinux, DAW: Nama, MIDI sequencer: Midish
All my latest music on https://www.youtube.com/channel/UCMS4rf ... 7jhC1Jnv7g
Albums, patches and Csound on http://juliencoder.de
User avatar
sysrqer
Established Member
Posts: 2143
Joined: Thu Nov 14, 2013 11:47 pm
Has thanked: 80 times
Been thanked: 36 times
Contact:

Re: (partially) physically modelled handpan/Rav drum

Post by sysrqer »

Thanks Jeanette, I didn't realise the file could be edited like that.


I've got it! I had to send the jack midi to midi through and midi through to csound. Sounds really nice, I'll definitely be using it in some tracks. Thank you for sharing.
jeanette_c
Established Member
Posts: 447
Joined: Tue May 12, 2020 5:53 pm
Has thanked: 156 times
Been thanked: 120 times

Re: (partially) physically modelled handpan/Rav drum

Post by jeanette_c »

sysrqer wrote: Wed Nov 10, 2021 5:38 pm Thanks Jeanette, I didn't realise the file could be edited like that.
I know, it's the awkward way of doing it, but I can't write good GUIs for Csound stuff.

I've got it! I had to send the jack midi to midi through and midi through to csound. Sounds really nice, I'll definitely be using it in some tracks. Thank you for sharing.
Thanks a lot for sticking with me and giving it a chance. Have you seen version 2 with all the scales. I had some fun trying them all out and found a few lovely ones. I'm still improving the sound and hope to have an update sooner rather than later.
--
distro: ArchLinux, DAW: Nama, MIDI sequencer: Midish
All my latest music on https://www.youtube.com/channel/UCMS4rf ... 7jhC1Jnv7g
Albums, patches and Csound on http://juliencoder.de
User avatar
sysrqer
Established Member
Posts: 2143
Joined: Thu Nov 14, 2013 11:47 pm
Has thanked: 80 times
Been thanked: 36 times
Contact:

Re: (partially) physically modelled handpan/Rav drum

Post by sysrqer »

jeanette_c wrote: Wed Nov 10, 2021 6:29 pm Thanks a lot for sticking with me and giving it a chance. Have you seen version 2 with all the scales. I had some fun trying them all out and found a few lovely ones. I'm still improving the sound and hope to have an update sooner rather than later.
I've just tried the scales and I'm blown away, this is right up my street. I say I tried them, I spent a lot of time with the Kurd one and even longer with the Golden Arcadia. I've set my keystep to arp mode with hold enabled, and the mode to be random, then just pressed all the keys at once. Been sitting hear listening to it like this for about half an hour now! I'm really impressed with this, the scales feature is amazing and the sound is really impressive. How is it done, is there particular synthesis method that it uses? I can make out a few things from the file such as the butterworth filters on the noise but not much more than that.

Is it possible for a probability setting to be added? I love to use chance/probability with weird scales and beautiful sounds, it makes it possible to listen to a fixed sequence for hours. Perhaps with the option to use pitchbend for it (I know this is a bit problematic, what would up do etc) or in addition to the existing mod wheel settings? It would be nice if it were dynamic somehow.

Regardless, this is fantastic. Thanks so much for sharing it. I can see this along with Mutable Instruments Rings and Plaits in string mode being at the core of what I often do these days. I bet this sounds amazing through Clouds!
User avatar
sysrqer
Established Member
Posts: 2143
Joined: Thu Nov 14, 2013 11:47 pm
Has thanked: 80 times
Been thanked: 36 times
Contact:

Re: (partially) physically modelled handpan/Rav drum

Post by sysrqer »

Just posted a link to this thread on the VCV Rack forum, I think a few people there would be interested in this.
jeanette_c
Established Member
Posts: 447
Joined: Tue May 12, 2020 5:53 pm
Has thanked: 156 times
Been thanked: 120 times

Re: (partially) physically modelled handpan/Rav drum

Post by jeanette_c »

Hi @sysrqer , wow! That's a glowing recommendation. Many thanks too for sharing over on the VCV rack forum. I hope that someone can get some fun out of it.

There's no particular model in Csound for that. I combined a few mode filters and waveguides. i.e. a very resonant bandpass or whatever, it's called modal filter. You ping it and it gives you a slowly decaying sine. The Q decides the decay. A waveguide is like Karplus Strong, a short delay with feedback, where delay time is given in Hz not in seconds. You can create all sorts of vibrating string instruments with it. The impulse was purely doine by ear, a mixture of a short noise burst and a sine with a frequency envelope. Like a high pitched kick drum or lazer sound.
I also started on the B Kurd and loved it. Playing it live is absolutely magical. Very hypnotic. Not sure if it is the body resonance or feeling the weight of the instrument upon your legs. It's fun, even though it is outside my normal sphere of reference. :) Trying a few scales, I also found myself going more into repetitive patterns.
OK, opening up the instrument. Integrating pitchbend shouldn't be difficult. Just a little consistency work. But what do you mean by introducing chance/probability? Whether a note plays or not? Or giving a random note of a scale on a key? Csound has lots of support for randomness and more controlled conditions. It's just a question of thinking it out and taking the time and dedication to write it out. :)
BTW. I'd love one of those interesting hardware reverbs. Hmmmmmm! :)
Thanks again for your feedback and I am very glad that you found some enjoyment in it!
--
distro: ArchLinux, DAW: Nama, MIDI sequencer: Midish
All my latest music on https://www.youtube.com/channel/UCMS4rf ... 7jhC1Jnv7g
Albums, patches and Csound on http://juliencoder.de
User avatar
sysrqer
Established Member
Posts: 2143
Joined: Thu Nov 14, 2013 11:47 pm
Has thanked: 80 times
Been thanked: 36 times
Contact:

Re: (partially) physically modelled handpan/Rav drum

Post by sysrqer »

Yes, I was thinking about probability of a note playing but adding random notes from the scale would also be really useful. For the pitchbend I was imagining using it as a control for probability rather than actual pitchbend (similar to what the mod wheel does) as I'm not sure bending the pitch would make too much sense for this particular instrument.

If it were just an option then that would be great but it would be really handy to be able to change probability in real time.
jeanette_c
Established Member
Posts: 447
Joined: Tue May 12, 2020 5:53 pm
Has thanked: 156 times
Been thanked: 120 times

Re: (partially) physically modelled handpan/Rav drum

Post by jeanette_c »

sysrqer wrote: Thu Nov 11, 2021 10:52 am Yes, I was thinking about probability of a note playing but adding random notes from the scale would also be really useful. For the pitchbend I was imagining using it as a control for probability rather than actual pitchbend (similar to what the mod wheel does) as I'm not sure bending the pitch would make too much sense for this particular instrument.
...
I think that wouldn't be too difficult. If it's only pitchbend, I could use the two directions. i.e. pitchbend down, decrease trigger probability and pitchbend up increase the chance of a different note being triggered. That wouldn't need too much editing. Thinking that the two things are quite different, one might also choose pitchbend and expression pedal (CC 11)?
Beyond that, I think, these features are more at home in the controlling sequencer or note generator. Even in MIDI sequencers these features are ever more present.
--
distro: ArchLinux, DAW: Nama, MIDI sequencer: Midish
All my latest music on https://www.youtube.com/channel/UCMS4rf ... 7jhC1Jnv7g
Albums, patches and Csound on http://juliencoder.de
Post Reply