After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 353137 - Supporting portamento
Supporting portamento
Status: RESOLVED OBSOLETE
Product: beast
Classification: Other
Component: plugins
SVN trunk
Other All
: Normal enhancement
: ---
Assigned To: Beast Maintainers
Beast Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-08-27 20:57 UTC by Stefan Westerfeld
Modified: 2020-11-17 12:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
IDL file for portamento plugin (1.84 KB, text/x-c++src)
2006-08-27 20:58 UTC, Stefan Westerfeld
Details
Implementation of portamento plugin (2.67 KB, text/x-c++src)
2006-08-27 20:59 UTC, Stefan Westerfeld
Details
Song using portamento plugin (70.85 KB, application/x-bzip2)
2006-08-27 21:01 UTC, Stefan Westerfeld
Details

Description Stefan Westerfeld 2006-08-27 20:57:09 UTC
A project I work on is trying to get a "famous" demo music ported to beast. One interesting characterstic of the music is that it uses portamento (sliding from one note to another) excessively:
 
   http://en.wikipedia.org/wiki/Portamento

But we don't support that at all, so I implemented a plugin to get the job done. The sound of the song is now already close to the original, but the editing is tedious. The reason is that the way that the plugin is controlled, a slide occurs only if while one note is played, another is played. Thus it is relatively simple to make one note slide up and down, while being held (i.e. between the note-on and note-off). But that means that a portamento will not cause retrigger. I've had a discussion with a friend, and he said: yes, thats the way some synthesizers do it (but only some).

Suppose now, we have the following suitable input for our portamento module (implementation given as attachment).

time (ms)  len (ms)  note
--------------------------
0.000       0.125     A-2      <--- here the note is triggered
0.100       0.100     E-3      <--- here it will just slide

This will cause a slide from A-2 up to E-3, but without retrigger. But if I need a slide with retrigger (and I tried to use that in the song), what to do? I change what I enter in the piano roll to these three lines:

time (ms)  len (ms)  note
--------------------------
0.000       0.080     A-2      <--- here the note is triggered
0.090       0.020     A-2      <--- here the note is triggered
                                    (no overlap with previous note)
0.100       0.100     E-3      <--- here it will just slide

That way, it sounds as if the E-3 is triggered, but not at E-3, but at A-2, and will then slide up to E-3. The problem with this approach is that it slightly messes up the tempo (because the "second note", which is the up-sliding note, is now 0.010 early), and that you have to enter and maintain more notes. Or more simply put: if your only wish is to make it "sound like the tracker piece", which has a different interface, the notes get harder to edit.

A stateful sliding implementation (as pointed out by wikipedia as sliding "from the last note played on the same channel" - quoted from memory) may be an advantage.

Maybe a few remarks to the properties: I've for now used exponential sliding between notes, which I think is ok for the task, which naturally led to a sliding speed specification in octaves per second (semitones per second, cent per second). However, this will mean that if you want large distance slides terminate in a reasonable time, then you'll almost not hear small distance slides.

So an option might be to add sliding speed in some "time specification", so that you say: slide between notes takes exactly ... 20ms or so, and the distance doesn't matter. Which of the two  specifications gets used is something the user should select.

It may also be desirable to make it possible to modulate the sliding speed via controllers from the outside, so that different notes in the same track can slide with different speeds.

For reference, here is an explanation of the Gxx effect, which my source material uses (but there may be better explanations on the web):

http://www.everything2.com/index.pl?node_id=1147574
Comment 1 Stefan Westerfeld 2006-08-27 20:58:32 UTC
Created attachment 71720 [details]
IDL file for portamento plugin
Comment 2 Stefan Westerfeld 2006-08-27 20:59:29 UTC
Created attachment 71721 [details]
Implementation of portamento plugin
Comment 3 Stefan Westerfeld 2006-08-27 21:01:29 UTC
Created attachment 71722 [details]
Song using portamento plugin

Beginnings of a beast version of the music of the Second Reality (Unreal ][) demo, original music by Purple Motion of Future Crew.
Comment 4 Stefan Westerfeld 2007-03-25 20:22:53 UTC
A prerendered version of the (start of the) file can be found here:

http://space.twc.de/~stefan/music/2nd_pm11.ogg
Comment 5 Stefan Westerfeld 2007-07-14 12:50:59 UTC
For those trying to reproduce this, here are the three lines I need to build and install the plugin.

sfidl --plugin bseportamento.idl > bseportamento.genidl.hh
g++ -shared -fPIC -o bseportamento.so bseportamento.cc `pkg-config --cflags --libs bse`
cp bseportamento.so /usr/local/beast/lib/bse/v0.7.1/plugins

You may need to adapt the version number in the third line, or if you want to install the plugin in another directory, you can add that directory to the beast plugin path with the preferences dialog.
Comment 6 Tim Janik 2020-11-17 12:13:21 UTC
This bug report is being closed due to the upcoming shutdown of
bugzilla.gnome.org. If this report is still deemed relevant, a
new issue can be filed at:
  https://github.com/tim-janik/beast/issues

We apologize for any inconveniences this may cause.
Comment 7 Tim Janik 2020-11-17 12:24:13 UTC
See also: https://github.com/tim-janik/beast/issues/5