Equalizer, shooter, and music tag parser.

A place for Ren'Py tutorials and reusable Ren'Py code.
Forum rules
Do not post questions here!

This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
Post Reply
Message
Author
User avatar
Vladya
Regular
Posts: 34
Joined: Sun Sep 20, 2020 3:16 am
Github: NyashniyVladya
Contact:

Equalizer, shooter, and music tag parser.

#1 Post by Vladya »

A few my recent projects.
(The sources on GitHub, if possible, provided with comments in Russian (in .rpy files) and English (in .py/.c/.h files) languages).

№1. "whatPlaying". Music file tag parser.

Image

Image

Image

Image

Compiled .rpa file for use in any RenPy game.
Sources.

It parses the metadata of the playing music and show information about it.
Data can be copied to the clipboard; you can also create a search query in Google/Yandex/YouTube/Wiki etc.
Support for all tag formats allowed by the RenPy has been implemented: ID3 (v1, v2.2, v2.3, v2.4), APEV2, Vorbis/Opus.
Also, if the song is available in iTunes, additional data will be downloaded from the network and a link to the store will be available.

P.S.: At the first start, there will be a long scanning process, during which not music will be shown, but the scanning status. The procedure is one-time, because song data is cached.


№2. "renQualizer". Something like an equalizer.


Sources.

Graphic visualization of the frequencies of the current audio sample on the channel. There are many possibilities of use: you can attach the image zoom to the signal volume, as in the example in the video; you can organize color music that changes color depending on the frequency value; and so on, for which there is enough imagination.

P.S .: In the file "_renqualizer_test.rpy" only examples. The main function for writing your ideas is '_renqualizer_test._bass_object.get_data'. Takes in a RenPy audio channel object, returns a tuple of 108 (12 notes * 9 octaves) elements representing the octave distribution from C1 to B9 in semitone steps (frequency of the current note * (2 ** (1 / 12))).

The elements are expressed as a float value from 0 to 1, the range of which represents the distribution of loudness values ​​in decibels: -96 to 0 dB.
For instance:
0.0: <=-96dB
0.5: -48dB
1.0: 0dB
etc.

P.P.S.: Since part of the logic of this project (reading audio samples of the current file) uses the python-cython-C bundle, the project needs compilation. The link has a compiled .pyd for windows, so win-users don't have to worry. On another operating system compile from the sources available on the link.



№3. "RenPyShooter". Something like a shooter.



Sources.

There isn't much to describe. An example of use in the file "script.rpy" from the link, demo in the video.


P.S.: I apologize in advance for possible punctuation/grammatical/stylistic/etc. errors in my post. My level of English is somewhere on the level of "London is the capital of Great Britain".

User avatar
bonnie_641
Regular
Posts: 133
Joined: Sat Jan 13, 2018 10:57 pm
Projects: Código C.O.C.I.N.A.
Deviantart: rubymoonlily
Contact:

Re: Equalizer, shooter, and music tag parser.

#2 Post by bonnie_641 »

Thank you very much :D
I speak and write in Spanish. I use an English-Spanish translator to express myself in this forum. If I make any mistakes, please forgive me.
I try my best to give an answer according to your question. :wink:

User avatar
Morhighan
Miko-Class Veteran
Posts: 975
Joined: Sun Jun 27, 2010 12:54 pm
Completed: AIdol, When Our Journey Ends, Forgotten Not Lost
Organization: MysteryCorgi
Tumblr: MysteryCorgi
Deviantart: MysteryCorgi
Soundcloud: MysteryCorgi
itch: MysteryCorgi
Location: USA
Contact:

Re: Equalizer, shooter, and music tag parser.

#3 Post by Morhighan »

Hey I wanted to thank you for these. Very cool!

Post Reply

Who is online

Users browsing this forum: No registered users