No Programming Knowlegde

Find quick help here to get you started with Hollywood
User avatar
1Mouse
Posts: 63
Joined: Sat Sep 11, 2010 9:27 pm

Re: No Programming Knowlegde

Post by 1Mouse »

Howdy,

Tell me if this is right: Track listings (names & length) can only be displayed if saved to hard drive as MP3?

If this is the case then what I had hoped to achieve isn't possible.

I thought it would be relatively easy when I first looked into doing this, but, for a little program that just has to recognise the CD in the player display tracks and coverart then play is not possible.

btw thanks for turning up here

PS if my project is doomed let me know

Thanks
gerograph
Posts: 39
Joined: Thu Mar 04, 2010 9:38 pm

Re: No Programming Knowlegde

Post by gerograph »

Well yes, I think so... getting trackname requires an internet connection and a routine for retrieving such informations. Getting Track length of CD Track is probably possible, because you can retrieve it directly from file(length).
Even MP3 makes only sense, if it has proper MP3 Tags, which also have to be retrieved through internet.
As you can see Hollywood is a nice framework, but isn't capable of playing/displaying all sorts of formats. Therefor in AMC, which is programmed in Hollywood you will find a lot of other programs integrated, which are just called from Hollywood script !

greetings gerograph
User avatar
1Mouse
Posts: 63
Joined: Sat Sep 11, 2010 9:27 pm

Re: No Programming Knowlegde

Post by 1Mouse »

Hi

I decided to start with something a little simplar, or so I thought.

I was going to take the LoadSound sub routine from AmiJukeBox and try and incorporate it into InTune.

I pasted it into "On Mouse Click" nothing happens.

Also if I open InTune in Notepad and paste it in that way I get a systax error.

I have also tried saving the subroutine as Load.hws so that when you click on the button set it to open a program InTune then says that Load.hws is not executable.

Please help.
PEB
Posts: 569
Joined: Sun Feb 21, 2010 1:28 am

Re: No Programming Knowlegde

Post by PEB »

You should probably post the exact code that is giving you problems (try to narrow it down as much as possible) so that others can look at it and try to help you better.
p-OS
Posts: 167
Joined: Mon Nov 01, 2010 11:56 pm

Re: No Programming Knowlegde

Post by p-OS »

Just a note about the contents of a CDDA.

1.Some years ago Sony introduced an extension to CDDA, called CD-TEXT. It uses previously empty space on the CDDA, thus such CDs are backwards compatible to older players. They simply ignore the additional information. Newer players however often are able to show you the title of the track and the title of the album.
Some publishers actually use this extension.
2.The default CD Filesystem of MorphOS 2.x, but also some others for MorphOS and AmigaOS, simulate a Data CD when a CDDA is inserted. You can list the tracks and copy them as if they were files !
Normally the files are called 1.aiff, 2.aiff or 1.wav,2.wav...
if the CDDA contains CD-TEXT, then you get a volume name and file names based on the title of the album resp. the titles of the tracks.

So at least in this special case it would be possible reading these informations with Hollywood by using normal DOS functions.
Bugala
Posts: 1178
Joined: Sun Feb 14, 2010 7:11 pm

Re: No Programming Knowlegde

Post by Bugala »

Thanks from explaining p-OS. I have always wondered about more details about that, since i knew there was possibility to do so but never actually got it.

It is propably very rare that part actually exists. For point is that when i have been asking about that from companies in FInland who handle pressing CDs in Finland or out of Finland, so far only one place have even known there is such possibility existing.

The press I am using made inquiry about that thing to Germany which is where they most of time press their CDs and they answered that most of their printing machines are 20 years old and dont have that option, but that there are couple of newer ones, but when orders are small, they are not specifically targeting to that machine.

So it is random wether your press happens to hit that machine if your small player.


Everytime i have pressed Cds I have included those texts but never have it hit that machine that had made them. So upon my own experience (supposing we talking of same thing) i suppose theres not many of those existing.


By the way, the way i was aware of those texts (that the so called professionals only rarely are) is thanks to Amiga!. For Amiga had one Cd Bruning software or something similar (dont remember right away which one) that had that text option for each track. Funnily Finlands biggest Cd press didnt know they had that option even available in their own program until i asked about it from them.
User avatar
1Mouse
Posts: 63
Joined: Sat Sep 11, 2010 9:27 pm

Re: No Programming Knowlegde

Post by 1Mouse »

This is the code I'm having problems with when I try to place it in with my code.

Not sure if some variables need to be set or cleared at the beginning of my code to be able to run this.

/* loads a new sound */
Function p_LoadSound()
Local file$ = FileRequest(“”, “#?”)
If file$ = “” Then Return
If Not Exists(file$)
SystemRequest(VER$, “Error opening file!”, “OK”)
Return
EndIf
If modloaded = TRUE
If modissample = TRUE
FreeSample(1)
Else
CloseMusic(1)
EndIf
modloaded = FALSE
modplaying = FALSE
modpause = FALSE
p_ClearVars()
EndIf
modissample = FALSE
If IsModule(file$) = True
mod$ = “Protracker module”
OpenMusic(1, file$)
ElseIf IsSample(file$) = True
mod$ = “IFF 8SVX sample”
modissample = TRUE
LoadSample(1, file$)
Else
SystemRequest(VER$, “Unknown sound format!”, “OK”)
Return
EndIf
curfile$ = FilePart(file$)
size$ = StrStr(FileSize(file$))
modloaded = TRUE
EndFunction

It works ok in the example I took it from but when transfered into my code I just get errors.
PEB
Posts: 569
Joined: Sun Feb 21, 2010 1:28 am

Re: No Programming Knowlegde

Post by PEB »

Exactly what error messages are you getting?
I'm sure the problem is actually NOT in this piece of code, even if errors appear here.
The example programs are great to help you learn how Hollywood works. But instead of copying and pasting from the examples, I would suggest writing your own code to fit in the program you are creating.
User avatar
1Mouse
Posts: 63
Joined: Sat Sep 11, 2010 9:27 pm

Re: No Programming Knowlegde

Post by 1Mouse »

I have made a fresh start with my program and have used the ID3.hws as a subroutine in my program and it now displays track name, artist and length.

But at present I can only load one MP3 at a time, is it possible to create some sort of playlist enabling loading of multiple tracks?

I have decided to stick with MP3s for now that are saved on my hard drive.

The files are saved in a folder under the artists name and album title within that.

Has anyone created a playlist or know how it's done?
Bugala
Posts: 1178
Joined: Sun Feb 14, 2010 7:11 pm

Re: No Programming Knowlegde

Post by Bugala »

There are quite many approaches to that question.

I havent actually looked much into Hollywoods playmusic features, so im not using actual right commands in this example:

Code: Select all

example playlist = { 
                              [0] = { songfile="where song is", songname="songname"},
                              [1} = { songfile="where next song is", songname="name of second song"}
                            }
          





function Checkifendoftrackreached(playlist)

if yes
   placing=placing+1
   loadmusic  (  playlist[placing].songfile  )
   playmusic (  playlist[placing].songfile   )
endif

end function

- - - start of program - - - 


playlist = loadtable("where_ever_playlist_is")



do

checkifendoftrackreached(playlist)

until endprgram=1
Post Reply