Difference between revisions of "Hyperradio Howto Musicpacks"

From Elite Wiki
m (Howto make musicpacks for the Hyperradio)
 
m (Retagged!)
 
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
===OVERVIEW===
+
[[Image:Hyperradio.png|right|Sounds really gooood]]
 +
=== Overview ===
 
----
 
----
 +
 
This document describes how to make your own and very personal [[Hyperradio_Musicpacks|Musicpack]] for the [[Hyperradio_js_OXP|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 [[Hyperradio_Musicpacks|Musicpack]] is very easy. A complete [[Hyperradio_Musicpacks|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:
 
This document describes how to make your own and very personal [[Hyperradio_Musicpacks|Musicpack]] for the [[Hyperradio_js_OXP|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 [[Hyperradio_Musicpacks|Musicpack]] is very easy. A complete [[Hyperradio_Musicpacks|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++.<br>
+
1. A texteditor (you can use the texteditor that comes with your OS) - for example Wordpad or use external tools like Notepad++.<br>
 
2. A soundeditor - for example Audacity to cut, edit and convert your files to Ogg-vorbis.
 
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?<br><br>
 
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?<br><br>
  
===CHAPTER 1 - Building the oxp structure===
+
=== Chapter 1 - Building the oxp structure===
 
----
 
----
  
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:\Oolite''' the AddOns folder is one level deeper. Here it would be:
   D:\Oolite171\AddOns\hyperradioClassicPackA.oxp
+
   D:\Oolite\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.
 
<br><br>
 
<br><br>
 
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:\Oolite\AddOns\hyperradioClassic01.oxp\Config\
   D:\Oolite171\AddOns\hyperradioClassicPackA.oxp\Music\
+
   D:\Oolite\AddOns\hyperradioClassic01.oxp\Music\
 
<br>
 
<br>
3. Open the Config folder and create two new files
+
3. Open the '''Config''' folder and create a new file
  descriptions.plist
 
 
   script.js
 
   script.js
  
TIP: You could create them as *.txt files and rename them after creation or rename them after adding the content.
+
TIP: You could create it as *.txt files and rename it after creation or rename it after adding the content.
<br><br>
 
4. Open descriptions.plist and add this content:
 
 
 
  // HyperRadio - Playlist Music Add-On
 
  {
 
    // DONT USE NAMES LIKE 01.ogg
 
    hyperradio_songlistClassicPackA =
 
    (
 
      "exampleA.ogg",
 
      "exampleB.ogg"
 
    );
 
  }
 
 
 
Save this file.
 
 
<br><br>
 
<br><br>
5. 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";
   hyperradio_stationlist.push("[hyperradio_songlistClassicPackA]");
+
   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.
 
Save this file.
Line 55: Line 52:
 
Now the structure setup is done.<br><br>
 
Now the structure setup is done.<br><br>
  
===CHAPTER 2 - Audio content===
+
=== Chapter 2 - Audio content===
 
----
 
----
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.
+
[[Image:Hyperradio_HT2_2a.png|thumb|right|100px|Picture 2.1]][[Image:Hyperradio_HT2_3a.png|thumb|right|100px|Picture 3.1]][[Image:Hyperradio_HT2_3b.png|thumb|right|100px|Picture 3.2]][[Image:Hyperradio_HT2_3c.png|thumb|right|100px|Picture 3.3]][[Image:Hyperradio_HT2_4a.png|thumb|right|100px|Picture 4.1]][[Image:Hyperradio_HT2_5a.png|thumb|right|100px|Picture 5.1]][[Image:Hyperradio_HT2_5b.png|thumb|right|100px|Picture 5.2]][[Image:Hyperradio_HT2_6a.png|thumb|right|100px|Picture 6.1]][[Image:Hyperradio_HT2_6b.png|thumb|right|100px|Picture 6.2]][[Image:Hyperradio_HT2_6c.png|thumb|right|100px|Picture 6.3]][[Image:Hyperradio_HT2_7a.png|thumb|right|100px|Picture 7.1]][[Image:Hyperradio_HT2_7b.png|thumb|right|100px|Picture 7.2]]
  
1. Copy your music files into the OXPs '''Music''' folder. As example I'm using here the file: '''Artist-Song_Name.mp3'''.
+
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.<br>
  
   D:\Oolite171\AddOns\hyperradioClassicPackA.oxp\Music\Artist-Songname.mp3
+
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
 
<br>
 
<br>
2. Open Audacity and d&d (drag and drop) this file into Audacity, or open it there.
+
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).
Audacity imports now this file with it's internal import filter - this can last a few seconds.
 
But then it should look like ---->
 
 
<br><br>
 
<br><br>
3. Now we have to check the file. 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 ----> and mark the last few seconds with the mouse ---->
+
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.
Then use the zoom ---->. Repeat this steps if necessary.
 
 
<br><br>
 
<br><br>
4. If you have marked the last few milliseconds choose Effect -> Fade Out
+
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.
Audacity changes now the loudness in the marked area with a fade to zero.
 
 
<br><br>
 
<br><br>
5. Now select Fit Project and select the whole file. This can be done be clicking inside the trackpanel on the left side or by
+
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
pressing STRG+A or by Edit -> Select -> All
 
 
<br><br>
 
<br><br>
6. Now we have to correct the general loudness. Choose Effect -> Amplify and move the slider until the New Peak Amplitude (db)
+
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.
is at -6.9. You can test it with the preview function, and if necessary change the level again. Then press OK.
 
 
<br><br>
 
<br><br>
7. Now it's time to export this file to Ogg-vorbis. File -> Export -> Choose file format OGG Files. Then choose Options to change the
+
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.
quality factor. Normally a medium factor is a good balance between quality and file size. Press OK and save this file (rename it if
 
neccesary - Oolite doesn't allow spaces and leading numerics in the filenames) to your Music folder.
 
 
<br><br>
 
<br><br>
 
8. Repeat steps 1-7 for all music files.
 
8. Repeat steps 1-7 for all music files.
  
 
Now the audio work is done.<br><br>
 
Now the audio work is done.<br><br>
 
+
__NOEDITSECTION__
===CHAPTER 3 - Finishing the OXP===
+
=== Chapter 3 - Finishing the OXP===
 
----
 
----
Now we have done all necessary setup work and we can finish the oxp.
+
We have done all necessary setup work and now we can finish the [[OXP]].
  
1. Open '''descriptions.plist''' and replace the example entries with your filenames
+
1. Open '''script.js''' and replace the example entries with your filenames (please avoid any spaces in the filenames)
  
   // HyperRadio - Playlist Music Add-On
+
   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()
 
   {
 
   {
     // DONT USE NAMES LIKE 01.ogg
+
     if (worldScripts.hyperradio) {
    hyperradio_songlistClassicPackA =
+
      worldScripts.hyperradio.stationList.push("hyperradio_playListClassic01");
    (
+
       worldScripts.hyperradio.hyperradio_playListClassic01 = [
      "Artist-Song_Name.ogg",
+
        "Rachmaninov-Allegro_moderato.ogg",
       "Artist-Song_Name_II.ogg",
+
        "TchaikovskyPyotrIlyich-ActII_Scene_Moderato.ogg"
      "Artist-Song_Name_III.ogg",
+
       ];
      "Artist-Song_Name_IV.ogg",
+
    }
       "Artist-Song_Name_V.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.<br>
 
Save it and you are ready to test it in Oolite.<br>
Line 111: Line 107:
 
Have fun...<br><br>
 
Have fun...<br><br>
  
===IMPORTANT NOTES===
+
=== 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.<br>
 
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.<br>
 
'''So check it carefully to avoid legal issues!!!'''<br><br>
 
'''So check it carefully to avoid legal issues!!!'''<br><br>
  
===WEBLINKS===
+
=== Weblinks ===
 
----
 
----
[http://notepad-plus.sourceforge.net Notepad++]  - Texteditor for Windows under the GPL Licence.
+
[http://notepad-plus.sourceforge.net Notepad++]  - Texteditor for Windows under the GPL Licence.<br>
 
+
[http://www.jedit.org jEdit] - Crossplatform texteditor for Mac OS X, OS/2, Unix, VMS and Windows under GPL 2.0.<br>
[http://www.jedit.org jEdit] - Crossplatform texteditor for Mac OS X, OS/2, Unix, VMS and Windows under GPL 2.0.
 
 
 
 
[http://audacity.sourceforge.net Audacity] - Crossplatform soundeditor for Mac OS X, Microsoft Windows, GNU/Linux
 
[http://audacity.sourceforge.net Audacity] - Crossplatform soundeditor for Mac OS X, Microsoft Windows, GNU/Linux
and other operating systems, distributed under the GNU General Public License (GPL).
+
and other operating systems, under GNU General Public License (GPL).<br>
 +
[http://creativecommons.org 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.<br><br>
  
[http://creativecommons.org CreativeCommons]<br><br>
+
=== Links ===
 +
----
 +
[[Hyperradio js OXP]]<br>
 +
[[Hyperradio Musicpacks]]
  
HOW TO MAKE YOUR OWN [[Hyperradio_Musicpacks|MUSICPACK]] FOR THE [[Hyperradio_js_OXP|HYPERRADIO]]
+
[[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