Open questions

From Performous

Jump to: navigation, search

Contents

[edit] Performous DLC (Downloadable Content)

This features aim to provide ingame track search/download for Performous. Performous Team could for example provides free content (Creative Commons) and other people car use it for personnal use (providing it privatly when showing it to friends without needing to always have all the songs on a removable media).

My (Yoda) proposal is to use bittorrent using libtorrent (Rasterbar) with DHT (BEP 05) and Web Seeding (BEP 19). This way even an non-seeded torrent can successfully be downloaded.

DLC will use feed given in the configuration file with an http link. Here is an example of DLC feed :

<?xml version="1.0" encoding="UTF-8"?>
<performous-dlc version="0.0" name="Official Performous DLC">
	<song>
		<title>Code Monkey</title>
		<artist>Jonathan Coulton</artist>
		<content>
			<cover>http://performous.org/dlc-cover/joco-code-monkey.png</cover>
			<content>magnet:?xt=urn:btih:0123456789012345678901234567890123456789&dn=joco-codemonkey</content>
		</content>
	</song>
</performous-dlc>

It could be nice if:

  • the feed can be shown in a song browser screen similar to the current song screen
  • the instrument provided by a song could be shown before the download
  • the already downloaded content are marked
  • the current downloading songs are marked with a percent of completion (and an ETA)
  • there were an easy (GUI) way to add/import sources
  • other ideas ...

Things to consider:

  • should the files be downloaded to a separate DLC dir?
  • should the downloaded files be arranged to folders by feed?

[edit] Menu for instrument configuration

WIP on branch joinmenu.

The configuration will be displayed for each player when it is detected (input on its joystick)

  • Return to game
  • Pause (not needed if opening the menu itself pauses the game)
  • Restart song
  • Choose/Change instrument (Guitar/Bass/Drums) according to the instrument capabilities
  • Choose/Change mode (Left/Right) if relevant
  • Choose/Change the difficulty (among available for the current instrument)
  • Choose/Change neck speed
  • Enter song with new settings as a new player
  • Leave (quit the song)

Obviously some options are only available at join time and some in "pause menu" during the song.

Changing instrument or difficulty should force the player to enter the song as a new player Menu should probably scroll to enable long list of choice.

We should find a way to interact with the menu (4 directions and 1 validation). If menu items are changed through a submenu and each submenu includes a back/cancel option, we can manage with up/down + enter keys (so only 3), which would be beneficial, since not all instruments have intuitive 4-directional navigation.

[edit] Joystick (keyboard/dancepad/instrument) outside binary

Yoda: Global + user defined xml mapping ?

[edit] Nighly binary build

Yoda: find a way to release beta/git version of Performous for packaged target (Windows/OSX). This will help tracking regressions and reduce testing procedures on these architectures

[edit] Pitch shifter

Here is the opinion of Vincent Verfaille (Doctor in Music Technology) when I asked for real time pitch shifter.

Bonjour Vincent,

Le plus simple et efficace me semble être une interpolation de la forme d'onde.
Par exemple, en augmentant le nombre de nouveaux échantillons M générés à partir de N < M échantillons d'origine,
on simule bien la pression sur la whammy bar lorsque le pitch descend; on simule en même temps les changements
de timbres liés au fait que la corde se détend, mais pas ceux des résonances de la caisse qui normalement ne bougent pas.
Cela dit, pour une guitare électrique, on se permet de les oublier.
Donc, l'algorithme le + simple est aussi le plus efficace!

Une interpolation cubique (voir des B-splines cubiques) est adaptée pour cela, elle permet de produire des
variations de phases cubiques et donc des variations de fréquence quadratique, ce qui évite les sauts de fréquence
aux extrémités de l'intervalle.
Il faut cependant filtre passe-bas le signal avant de le ré-échantillonner, pour éviter le repliement du spectre;
la fréquence de coupure de ce passe bas est donc N/M * Fn (Fn: demi-fréquence d'échantillonnage du signal original).
Tout ceci peut se faire en temps réel, avec une latence de quelques échantillons (le nombre d'échantillons pour
une interpolation cubique étant 4).

Après, reste le problème de la longueur du signal puisque sinon, le signal généré est plus long que le
signal de départ. Deux solutions:
- ajout-superposition (overlap-add = OLA): ré-échantillonnage + passe bas -> OLA, et le tour est joué.
Par contre, cela peut générer des problèmes de phase lors de l'OLA, d'où l'utilisation de méthodes
pitch-synchrones (PSOLA). Ça peut rester du temps-réel, mais avec plus de latence... et d'artefacts potentiels.
- sinon, considérer que la "whammy bar" ne va que vers la caisse de la guitare (et le pitch uniquement
vers le bas); dans ce cas, utiliser le signal d'entrée pour générer le signal de sortie comme expliqué
précédemment, puis le moduler en amplitude en fonction du signal d'entrée. Autrement dit, la hauteur
et le timbre sont obtenus par un signal de plus en plus désynchronisé, mais l'amplitude par le signal
réel. C'est une autre bidouille efficace, surtout lorsque le signal s'éteint vite. Dès que le whammy
bar est relâchée, on revient en mode normal.

Voilà, j'espère que ça aidera!
Vous trouverez les codes Matlab de la transposition (pitch-shifting) par ré-échantillonnage et de la
transposition pitch-synchrone dans des livres comme celui d'Udo Zoelzer (Dagitial Audio Effects; les
codes existent en ligne), il fait exactement ce qu'il vous faut.

Bonne chance,

Vincent Verfaille

Will translate this as soon as I have time (Yoda 23:34, 25 January 2010 (UTC))

[edit] translation from Google translate

Hello Vincent,

The simplest and most effective seems to be an interpolation of the waveform. For example, increasing the number of new samples generated from M N <M samples of origin well it simulates the pressure on the whammy bar when the pitch goes down, it simulates the same time changes stamps related to the fact that the rope is relaxed, but not those of the resonances of the body that normally do not move. However, for an electric guitar, we allow ourselves to forget. So, the algorithm is the + single most effective!

Cubic interpolation (see B-splines) is adapted to this, it can produce cubic phase variations and hence quadratic frequency variations, which avoids the frequency hopping the ends of the interval. It must, however, low-pass filter the signal before re-sampled to avoid aliasing; cutoff of this lowpass is N / M * Fn (Fn: half-sampling frequency of original signal). All this can be done in real time, with a latency of few samples (the number of samples for cubic interpolation being 4).

Then there remains the problem of the length of the signal because otherwise the signal generated is longer than the starting signal. Two solutions: - Add-overlay (overlap-add = OLA): resampling + lowpass -> OLA, and voila. By cons, it can cause phase problems at the OLA, hence the use of methods pitch-synchronous (PSOLA). It can stay on the real-time, but with more lag ... and potential artifacts. - Otherwise, consider that the "whammy bar" is only going to fund the guitar (and the only pitch down), in which case, use the input signal to generate the output signal as explained above, then the amplitude modulated as a function of input signal. In other words, the height and tone are achieved by a signal increasingly out of sync, but the amplitude of the signal real. This is another hack effective, especially when the signal goes off quickly. Once the whammy bar is released, it returns to normal.

Well, I hope it helps! You will find the Matlab code transposition (pitch-shifting) by re-sampling and transposition pitch-synchronous in books like Udo Zoelzer (Dagitial Audio Effects; the codes are available online), it does exactly what you need.

Good luck

Vincent Verfaille

[edit] links

  • V. Verfaille, DRIVING PITCH-SHIFTING AND TIME-SCALING ALGORITHMS WITH ADAPTIVE AND GESTURAL TECHNIQUES: [1]
Personal tools