Difference between revisions of "Hyperradio Howto Musicpacks"

From Elite Wiki
m
m (clean up)
Line 13: Line 13:
 
----
 
----
   
1. Create a folder in Oolites '''AddOns''' folder - for example '''hyperradioClassicPackA.oxp'''.<br>
+
1. Create a folder in Oolites '''AddOns''' folder - for example '''hyperradioClassic01.oxp'''.<br>
So if Oolite is installed under '''D:\Oolite171''' the AddOns folder is one level deeper. Here it would be:
+
So if Oolite is installed under '''D:\Oolite172''' the AddOns folder is one level deeper. Here it would be:
D:\Oolite171\AddOns\hyperradioClassicPackA.oxp
+
D:\Oolite172\AddOns\hyperradioClassic01.oxp
   
 
The following steps will reference only to this [[OXP]] and NOT to Oolites internal used folders.
 
The following steps will reference only to this [[OXP]] and NOT to Oolites internal used folders.
Line 21: Line 21:
 
2. Create there a '''Config''' folder and a '''Music''' folder
 
2. Create there a '''Config''' folder and a '''Music''' folder
   
D:\Oolite171\AddOns\hyperradioClassicPackA.oxp\Config\
+
D:\Oolite172\AddOns\hyperradioClassic01.oxp\Config\
D:\Oolite171\AddOns\hyperradioClassicPackA.oxp\Music\
+
D:\Oolite172\AddOns\hyperradioClassic01.oxp\Music\
 
<br>
 
<br>
 
3. Open the '''Config''' folder and create one new files
 
3. Open the '''Config''' folder and create one new files
Line 31: Line 31:
 
4. Open '''script.js''' and add this content:
 
4. Open '''script.js''' and add this content:
   
this.name = "hyperradioClassicPackA";
+
this.name = "hyperradioClassic01";
 
this.author = "Your name";
 
this.author = "Your name";
 
this.copyright = "CC-by-nc-sa-3.0";
 
this.copyright = "CC-by-nc-sa-3.0";
this.description = "Classic Pack A";
+
this.description = "Classic Pack 01 for the Hyperradio";
 
this.version = "1.00";
 
this.version = "1.00";
 
this.startUp = function()
 
this.startUp = function()
Line 60: Line 60:
 
1. '''Copy''' your music files into the OXPs '''Music''' folder. As example I'm using here the file: '''Artist-Song_Name.mp3'''.
 
1. '''Copy''' your music files into the OXPs '''Music''' folder. As example I'm using here the file: '''Artist-Song_Name.mp3'''.
   
D:\Oolite171\AddOns\hyperradioClassicPackA.oxp\Music\Artist-Songname.mp3
+
D:\Oolite172\AddOns\hyperradioClassic01.oxp\Music\Artist-Songname.mp3
 
<br>
 
<br>
 
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).
 
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).
Line 72: Line 72:
 
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.
 
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.
 
<br><br>
 
<br><br>
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.
+
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.
 
<br><br>
 
<br><br>
 
8. Repeat steps 1-7 for all music files.
 
8. Repeat steps 1-7 for all music files.
Line 84: Line 84:
 
1. Open '''script.js''' and replace the example entries with your filenames (please avoid any spaces in the filenames)
 
1. Open '''script.js''' and replace the example entries with your filenames (please avoid any spaces in the filenames)
   
this.name = "hyperradioClassicPackA";
+
this.name = "hyperradioClassic01";
 
this.author = "Your name";
 
this.author = "Your name";
 
this.copyright = "CC-by-nc-sa-3.0";
 
this.copyright = "CC-by-nc-sa-3.0";
this.description = "Classic Pack A";
+
this.description = "Classic Pack 01 for the Hyperradio";
 
this.version = "1.00";
 
this.version = "1.00";
 
this.startUp = function()
 
this.startUp = function()
Line 100: Line 100:
 
delete this.startUp;
 
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.<br>
 
Save it and you are ready to test it in Oolite.<br>
Line 123: Line 124:
 
[[Hyperradio_js_OXP]]<br>
 
[[Hyperradio_js_OXP]]<br>
 
[[Hyperradio_Musicpacks]]<br><br>
 
[[Hyperradio_Musicpacks]]<br><br>
Written by [[User:Svengali|Svengali]]. Still questions? If so take a look into the Bulletin Board.
+
Written by [[User:Svengali|Svengali]]. Still questions? If so take a look (and drop a note) into the Bulletin Board.

Revision as of 18:58, 3 April 2009

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 Notepad, 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:\Oolite172 the AddOns folder is one level deeper. Here it would be:

 D:\Oolite172\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:\Oolite172\AddOns\hyperradioClassic01.oxp\Config\
 D:\Oolite172\AddOns\hyperradioClassic01.oxp\Music\


3. Open the Config folder and create one new files

 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 = new Array(
       "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:\Oolite172\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 = new Array(
       "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 NOTES


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

Written by Svengali. Still questions? If so take a look (and drop a note) into the Bulletin Board.