Difference between revisions of "Hyperradio Howto Musicpacks"

From Elite Wiki
m (updated categorization: removed OXP status as it is not the OXP page itself)
m (Retagged!)
 
(2 intermediate revisions by one other user not shown)
Line 24: Line 24:
 
   D:\Oolite\AddOns\hyperradioClassic01.oxp\Music\
 
   D:\Oolite\AddOns\hyperradioClassic01.oxp\Music\
 
<br>
 
<br>
3. Open the '''Config''' folder and create one new files
+
3. Open the '''Config''' folder and create a new file
 
   script.js
 
   script.js
  
Line 40: Line 40:
 
     if (worldScripts.hyperradio) {
 
     if (worldScripts.hyperradio) {
 
       worldScripts.hyperradio.stationList.push("hyperradio_playListClassic01");
 
       worldScripts.hyperradio.stationList.push("hyperradio_playListClassic01");
       worldScripts.hyperradio.hyperradio_playListClassic01 = new Array(
+
       worldScripts.hyperradio.hyperradio_playListClassic01 = [
 
         "artist-songA.ogg",
 
         "artist-songA.ogg",
 
         "artist-songB.ogg"
 
         "artist-songB.ogg"
       );
+
       ];
 
     }
 
     }
 
     delete this.startUp;
 
     delete this.startUp;
   }
+
   };
  
 
Save this file.
 
Save this file.
Line 93: Line 93:
 
     if (worldScripts.hyperradio) {
 
     if (worldScripts.hyperradio) {
 
       worldScripts.hyperradio.stationList.push("hyperradio_playListClassic01");
 
       worldScripts.hyperradio.stationList.push("hyperradio_playListClassic01");
       worldScripts.hyperradio.hyperradio_playListClassic01 = new Array(
+
       worldScripts.hyperradio.hyperradio_playListClassic01 = [
 
         "Rachmaninov-Allegro_moderato.ogg",
 
         "Rachmaninov-Allegro_moderato.ogg",
 
         "TchaikovskyPyotrIlyich-ActII_Scene_Moderato.ogg"
 
         "TchaikovskyPyotrIlyich-ActII_Scene_Moderato.ogg"
       );
+
       ];
 
     }
 
     }
 
     delete this.startUp;
 
     delete this.startUp;
   }
+
   };
 
Please check that you are using identical identifiers (names) for the suffix (here '''Classic01''').
 
Please check that you are using identical identifiers (names) for the suffix (here '''Classic01''').
  
Line 123: Line 123:
 
----
 
----
 
[[Hyperradio js OXP]]<br>
 
[[Hyperradio js OXP]]<br>
[[Hyperradio Musicpacks]]<br><br>
+
[[Hyperradio Musicpacks]]
Written by [[User:Svengali|Svengali]]. Still questions? If so take a look (and drop a note) into the Bulletin Board.
+
 
 +
[[Category:OXP API's]]

Latest revision as of 13:44, 20 September 2023

Sounds really gooood

Overview


This document describes how to make your own and very personal Musicpack for the Hyperradio and is not meant as a explanation on how-to-rip-my-CDs. There are a lot of programs - and even free cross-platform progs - out there with specific documentation, related to that point. However, making your own Musicpack is very easy. A complete Musicpack with 5 songs can be done within a few minutes! You should be familiar with creating folders and files (that's the basics of OS handling) and you will need two tools to do it:

1. A texteditor (you can use the texteditor that comes with your OS) - for example Wordpad or use external tools like Notepad++.
2. A soundeditor - for example Audacity to cut, edit and convert your files to Ogg-vorbis.

That's all you need - eh, except maybe a clue where you could get some audio-files. But that's not a real problem, or is it?

Chapter 1 - Building the oxp structure


1. Create a folder in Oolites AddOns folder - for example hyperradioClassic01.oxp.
So if Oolite is installed under D:\Oolite the AddOns folder is one level deeper. Here it would be:

 D:\Oolite\AddOns\hyperradioClassic01.oxp

The following steps will reference only to this OXP and NOT to Oolites internal used folders.

2. Create there a Config folder and a Music folder

 D:\Oolite\AddOns\hyperradioClassic01.oxp\Config\
 D:\Oolite\AddOns\hyperradioClassic01.oxp\Music\


3. Open the Config folder and create a new file

 script.js

TIP: You could create it as *.txt files and rename it after creation or rename it after adding the content.

4. Open script.js and add this content:

 this.name           = "hyperradioClassic01";
 this.author         = "Your name";
 this.copyright      = "CC-by-nc-sa-3.0";
 this.description    = "Classic Pack 01 for the Hyperradio";
 this.version        = "1.00";
 this.startUp = function()
 {
   if (worldScripts.hyperradio) {
     worldScripts.hyperradio.stationList.push("hyperradio_playListClassic01");
     worldScripts.hyperradio.hyperradio_playListClassic01 = [
       "artist-songA.ogg",
       "artist-songB.ogg"
     ];
   }
   delete this.startUp;
 };

Save this file.

Now the structure setup is done.

Chapter 2 - Audio content


Picture 2.1
Picture 3.1
Picture 3.2
Picture 3.3
Picture 4.1
Picture 5.1
Picture 5.2
Picture 6.1
Picture 6.2
Picture 6.3
Picture 7.1
Picture 7.2

This document doesn't explain how to rip your CDs, but if you already have some music files on your hard disk it explains how to use Audacity to convert them to Ogg-vorbis. There are a lot of other tools out there and the handling might be different from program to program, but the basics are always the same.

1. Copy your music files into the OXPs Music folder. As example I'm using here the file: Artist-Song_Name.mp3.

 D:\Oolite\AddOns\hyperradioClassic01.oxp\Music\Artist-Songname.mp3


2. Open Audacity and d&d (drag and drop) this file into Audacity, or open it there. Audacity imports now this file with it's internal import filter - this can last a few seconds. This importfilter supports different types of audio-files (the most common types are supported). But then it should look like (Picture 2.1).

3. Now we have to check the file. Before we can start editing you will need an overview if this file is usable or not. On the first look it seems to be necessary to correct this file, because at the end of the track (song) it looks as if the loudness is not zero. So choose the marker tool (Picture 3.1) and mark the last few seconds with the mouse (Picture 3.2). Then use the zoom (Picture 3.3). Repeat this steps if necessary.

4. If you have marked the last few milliseconds choose Effect -> Fade Out (Picture 4.1). Audacity changes now the loudness in the marked area with a fade to zero.

5. Now select Fit Project (Picture 5.1) and select the whole file. This can be done be clicking inside the trackpanel on the left side (Picture 5.2) or by pressing STRG+A or by Edit -> Select -> All

6. Now we have to correct the general loudness. Choose Effect -> Amplify (Picture 6.1) and move the slider until the New Peak Amplitude (db) is at -6.9 (Picture 6.2). You can test it with the preview function, and if necessary change the level again. Then press OK. Now you can see that the amplitude has been reduced. This is necessary, because Oolite has no loudness per channel handling and a player should hear if something is happening.

7. Now it's time to export this file to Ogg-vorbis. File -> Export -> Choose file format OGG Files (Picture 7.1). Then choose Options to change the quality factor. Normally a medium factor is a good balance between quality and file size (Picture 7.2). Press OK and save this file (rename it if neccesary - Oolite doesn't allow spaces and leading numerics in the filenames) to your OXPs Music folder.

8. Repeat steps 1-7 for all music files.

Now the audio work is done.

Chapter 3 - Finishing the OXP


We have done all necessary setup work and now we can finish the OXP.

1. Open script.js and replace the example entries with your filenames (please avoid any spaces in the filenames)

 this.name           = "hyperradioClassic01";
 this.author         = "Your name";
 this.copyright      = "CC-by-nc-sa-3.0";
 this.description    = "Classic Pack 01 for the Hyperradio";
 this.version        = "1.00";
 this.startUp = function()
 {
   if (worldScripts.hyperradio) {
     worldScripts.hyperradio.stationList.push("hyperradio_playListClassic01");
     worldScripts.hyperradio.hyperradio_playListClassic01 = [
       "Rachmaninov-Allegro_moderato.ogg",
       "TchaikovskyPyotrIlyich-ActII_Scene_Moderato.ogg"
     ];
   }
   delete this.startUp;
 };

Please check that you are using identical identifiers (names) for the suffix (here Classic01).

Save it and you are ready to test it in Oolite.
And if everything is fine you can delete the no more used musicfiles (mp3, wavs,...).

Have fun...

Important note


If you are planning to publish it take care that you are allowed to use the musicfiles. Some examples and more documentation can be found on http://creativecommons.org.
So check it carefully to avoid legal issues!!!

Weblinks


Notepad++ - Texteditor for Windows under the GPL Licence.
jEdit - Crossplatform texteditor for Mac OS X, OS/2, Unix, VMS and Windows under GPL 2.0.
Audacity - Crossplatform soundeditor for Mac OS X, Microsoft Windows, GNU/Linux and other operating systems, under GNU General Public License (GPL).
CreativeCommons- The Creative Commons (CC) is a non-profit organization devoted to expanding the range of creative works available for others to build upon legally and to share.

Links


Hyperradio js OXP
Hyperradio Musicpacks