Vega
(Vega Carlson)
December 11, 2021, 8:16am
1
I have started work porting the Pink Trombone from Pink Trombone into VCV. The original code base is actually already available in C++ and MIT licenced at GitHub - cutelabnyc/pink-trombone-cpp: C++ implementation of everyone's favorite Pink Trombone and my efforts so far can be seen at GitHub - VegaDeftwing/PinkTromboneVCV: Attempt to port Pink Trombone to VCV Rack
I believe I have made significant progress; however, currently upon adding the module memory almost immediately climbs to 100%, so clearly I have a memory leak somewhere. Unfortunately, this is a bit outside my skill level to make much more progress on, as such I would greatly appreciate any contributions/PRs or for someone else to take the torch from here.
12 Likes
synthi
(Antonio Tuzzi)
December 11, 2021, 9:58am
2
first comments
the bgnd svg is too complex and contains some wrong instructions, crashing the nvgRenderer
you call the
void onAdd() override {
initializeTractProps(&tractProps, n);
...
}
but this is happening AFTER you inizialize the
Tract * tract = new Tract(sampleRate, samplesPerBlock, &tractProps);
(happening on the stack)
more to come
2 Likes
synthi
(Antonio Tuzzi)
December 11, 2021, 10:49am
3
I have modified all the classes
to have
correct destructors
correct sequence of destructions
no more memory leaks…
(I can allocate hundreds and delete all them and the memory is back )
comments:
A)
currently is doing nothing
B)
you should rewrite in C++ all memory allocation and destructions
I’ll pass you a zip (I used it on a MAC)
created a PULL request for you
VegaDeftwing:main
← antoniotuzzi:main
opened 11:05AM - 11 Dec 21 UTC
just cleaning the memory allocations sequences
and creating REAL destructors
12 Likes
Vega
(Vega Carlson)
December 11, 2021, 12:54pm
5
I just accepted your PR and added an output line and it is working right as you made the demo output PR too! I can definitely take it over the finish line from here. Thank you so much!
4 Likes
synthi
(Antonio Tuzzi)
December 11, 2021, 1:43pm
7
oops just noticed I did comment out something last second, breaking the build
correcting
1 Like
Vega
(Vega Carlson)
December 11, 2021, 1:44pm
8
I already have it working, just trying to adjust other parameters rn
Vega
(Vega Carlson)
December 11, 2021, 1:47pm
10
I’m currently trying to figure out how to change the frequency. I thought it would just be
glottis->setTargetFrequency(params[PITCHO_PARAM].getValue() * 1000.0);
but that results in a mute output
edit: not mute, but very faint filtered noise
Vega
(Vega Carlson)
December 11, 2021, 1:57pm
11
andddd I got it, just had to put it in a process divider
synthi
(Antonio Tuzzi)
December 11, 2021, 2:13pm
12
correct formula human voice is
float range = math::rescale(params[PITCHO_PARAM].getValue(), 0, 1, 0, 5);
float freq = pow(2.0, range) * 65.406391325149612;
glottis->setTargetFrequency(freq);
you have widget one on top of the OTHER ! CAOS!
example move the PITCHO_PARAM
using this
addParam(createParamCentered<HexKnob>(mm2px(Vec(17.0, 36.0)), module, PinkTrombone::PITCHO_PARAM));
Vega
(Vega Carlson)
December 11, 2021, 2:37pm
14
Yeah, I like having the stacked attenuator offset thing, and it’s inspired by hardware
1 Like
synthi
(Antonio Tuzzi)
December 11, 2021, 2:40pm
15
brrrr, che paura !!! (i pots uno sull’altro… )
add the cv input to the pitch:
float range = math::rescale(params[PITCHO_PARAM].getValue() + params[PITCHA_PARAM].getValue() * inputs[PITCH_INPUT].getVoltage() * 0.2, 0, 1, 0, 5);
1 Like
gael
(Wadaga)
December 11, 2021, 7:09pm
16
hey there !
Just a little message of encouragement, I love the sound of this pink trombone !
If you could make it a module for vcv, it would be really fantastic !
I can be a beta tester, only on linux though.
Thank you for the discovery, and thank you a lot for the work you are currently doing !
1 Like
Next up, Shatner’s Bassoon I hope
2 Likes
pgatt
(Pgatt)
December 11, 2021, 8:22pm
20
Antonio has modules that do that for him.
5 Likes
synthi
(Antonio Tuzzi)
December 11, 2021, 8:41pm
21
debugging it’s like playing chess, and they pay me too !
1 Like