Closed GoogleCodeExporter closed 9 years ago
Not sure how to handle volume changes. The chart audio volume can be changed
easily
but Allegro doesn't allow you to go above 100% volume. Allegro 5 actually
provides
some nice audio features that would make something like this trivial. I think
the
default mixer is floating point and it has a post-processing system that you
can hook
into (so we can mix the audio cues in). Floating point audio is much easier to
mix. I
think this feature will wait until EOF is ported to Allegro 5.
Original comment by xander4j...@yahoo.com
on 24 May 2010 at 4:00
This feature was requested again here:
http://www.fretsonfire.net/forums/viewtopic.php?f=11&t=32725&start=900#p555030
Thinking from a different angle, I can see that the current tick/clap sounds
can't have their volume controlled independently because they're mixed in with
the chart audio. If we play the tick and clap cues with play_sample(), as the
piano tones are played, then we can specify the volume for each. This would,
however, defeat the intentional act of mixing it in to guarantee the cues are
synced with the audio.
It looks like the audio cue voices are mixed in with the chart audio in
eof_mix_callback(). I don't suppose there's a way to alter the cue volume
(such as applying an amplification/de-amplification) during this process is
there?
Even on a newer version of Allegro, I don't see how cue/audio sync can be
guaranteed without continuing to mix the audio into one audio stream. If
that's the case, then the cue volume will likely need to have its volume
adjusted during the mix.
Original comment by raynebc
on 24 Sep 2010 at 5:12
Began in r393. By defining a volume level for each cue, the cues' amplitudes
can be manipulated before they are mixed into the chart audio.
Original comment by raynebc
on 25 Sep 2010 at 11:53
r394 continues work by adding a user interface for defining the volume of each
cue. It seems to be working quite well. When the percussion sounds are
implemented, a volume slider could be implemented for this as well. This would
work best if vocal percussion has its own voice, as the clap, tick and tone
each do.
Original comment by raynebc
on 26 Sep 2010 at 3:31
r396 implements a volume slider for the vocal percussion cue.
Original comment by raynebc
on 26 Sep 2010 at 5:45
I made a callback routine for the volume slider (eof_set_cue_volume), but I
haven't finished implementing it. I wanted it to be able to display the
currently selected volume percentage for each slider. I'm assuming this could
be done by having eof_menu_audio_cues define an integer for each slider, having
the callback update the integer and having the dialog menu display the integer
variable for each slider.
Original comment by raynebc
on 26 Sep 2010 at 5:57
After the slider value logic, I would consider this enhancement complete unless
we wanted to make a volume slider for the chart audio.
Original comment by raynebc
on 27 Sep 2010 at 6:28
Previously, when I was talking with the folks on the Allegro IRC channel about
the volume, I believe they indicated that Allegro's built-in volume control was
linear (they only multiply the amplitude by the specified volume percentage),
which is not the way humans intuitively perceive loudness. I am using their
recommended sqrt(volume percentage) as the amplitude multiplier, and it seems
to work as one would expect. If we implement a chart audio volume slider, it
may be best to apply this same volume logic instead of specifying a custom
volume to the functions that play back the OGG file. At the very least, it
would keep the volumes consistent.
Original comment by raynebc
on 28 Sep 2010 at 5:42
r410 adds a volume slider for the chart audio.
Original comment by raynebc
on 29 Sep 2010 at 4:09
Completed in r411.
Original comment by raynebc
on 29 Sep 2010 at 6:48
Original issue reported on code.google.com by
raynebc
on 20 May 2010 at 6:17