Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Property ports for MidiSynth #112

Closed
wants to merge 7 commits into from

Conversation

@swesterfeld
Copy link
Collaborator

swesterfeld commented Aug 3, 2019

This ports all properties of the MidiSynth to C++ (except for object properties SNet/PNet).

I had to fix a bug in BsePcmOutput (first commit), because setting the volume on the output object had no effect, but I wanted to test my code.

To have 1:1 the same ranges, I introduced constants for BSE_MIN|MAX_VOLUME_dB, but maybe this should just be hardcoded to -96 / 24. For the new max midi channel constant I think a constant should be used (maybe moved up to the other constants).

I noticed that some property idl constants don't combine properly. If you write Range (... GUI STORAGE ...), this expands to "r:w:G" "r:w:S" - so instead of getting a "G" hint, you get a "Gr" hint. Here I used STANDARD as ported property type, to work around the issue,which has both "G" and "S" hints. Not sure what is intended here, but adding ":" at the beginning and end of each property constant would allow using both versions for a GUI & STORAGE property.

swesterfeld added 7 commits Aug 2, 2019
The output volume property used to be ignored, which is fixed now.

Signed-off-by: Stefan Westerfeld <stefan@space.twc.de>
Signed-off-by: Stefan Westerfeld <stefan@space.twc.de>
Signed-off-by: Stefan Westerfeld <stefan@space.twc.de>
Signed-off-by: Stefan Westerfeld <stefan@space.twc.de>
Signed-off-by: Stefan Westerfeld <stefan@space.twc.de>
Signed-off-by: Stefan Westerfeld <stefan@space.twc.de>
Signed-off-by: Stefan Westerfeld <stefan@space.twc.de>
group _("Adjustments") {
float64 volume_f = Range (_("Master [float]"), _("Master volume as factor"),
STORAGE,
0, 15.8489319246111 /* +24dB */, 0.1, 1.0);

This comment has been minimized.

Copy link
@tim-janik

tim-janik Aug 9, 2019

Owner

15.84... used to be calculated as a factor from MAX_dB, if we every adjust MAX-dB in the IDL file, this needs to be adjusted as well, so it shouldn't be hardcoded.
I.e. just add another constant next to the MAX_dB constant definition and use that for this registration, so it's obvious that both have to be adapted if we touch the constants in the future.

@tim-janik tim-janik closed this in 155c021 Aug 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.