SyntaxBoom

General Category => Worklogs => Topic started by: Hardcoal on Jun 08, 2025, 07:28 PM

Title: Hardcoal's Music Projects..
Post by: Hardcoal on Jun 08, 2025, 07:28 PM
(https://i.imgur.com/psPg1wt.jpeg)

Just Testing this..


This code is for copying a dragged file into your project Folder, if its not already there
Code (blitzmax) Select
Strict

Function CopyFileIfNotExists(OriginalFileURL:String, DestinationFolderURL:String)  'Copies file to Destination only if its not already there
Local FN:String = ExtractFilenameFromURL(OriginalFileURL)
Local NFU:String = DestinationFolderURL + FN
    If FileExists (NFU) = False
CopyFile(OriginalFileURL, NFU)
Print "File copied to Destination"
    End If
End Function

Function ExtractFilenameFromURL:String(FileNameAndPath:String, ReturnWithoutFileEnding = False, ReturnEvenIfNoFileEnding = True)

If ExtractExt(FileNameAndPath) = "" And ReturnEvenIfNoFileEnding = False Then Return

Local LenFNA = Len(FileNameAndPath)

For Local I = LenFNA To 1 Step - 1

Local MidFNA:String = Mid(FileNameAndPath, I, 1)

If MidFNA = "/" Or MidFNA = "\" Then

Local MaybeFileName:String = Right(FileNameAndPath, LenFNA - I)

If ReturnWithoutFileEnding = True Then MaybeFileName = StripAll(MaybeFileName)

Return MaybeFileName

End If

Next

Return FileNameAndPath
End Function

Function FileExists(URLAndFilename:String = "")
Local TempStream:TStream
TempStream = OpenStream(URLAndFilename, False, False)
If TempStream <> Null Then
CloseStream(TempStream)
Return True
End If
End Function
Title: Re: Hardcoal's Music Projects..
Post by: Dabzy on Jun 08, 2025, 07:30 PM
That looks really neat and tidy that! :)

Very nice!

Dabz
Title: Re: Hardcoal's Music Projects..
Post by: Hardcoal on Jun 08, 2025, 07:32 PM
Thanks.. Ill post all what concerns Music/Audio under one Topic.
Title: Re: Hardcoal's Music Projects..
Post by: Dabzy on Jun 08, 2025, 07:39 PM
There is a forum for general media discussion (scroll down the list), but if there is code involved, then yeah, might be better to stay in the realms of the BlitzMax bit!  8)

Dabz
Title: Re: Hardcoal's Music Projects..
Post by: Hardcoal on Jun 08, 2025, 10:41 PM
You can move it if you think its the wrong place. I dont mind :)

Just another image of a different project

(https://i.imgur.com/FfyfzoL.jpeg)


Eventually my main goal is to make music.
so soon maybe ill be able to do it my way.

EDIT: I've shuffled it to the Worklogs section, I think that will be a better home for it as it's about your projects - Dabz
Title: Re: Hardcoal's Music Projects..
Post by: Hardcoal on Jun 12, 2025, 02:27 PM
(https://i.imgur.com/mMstDBs.jpeg)

ONE subsection of my music project is cell recorder..
its like in ableton that you can press a cell and record and than
loop the whole Column..


Title: Re: Hardcoal's Music Projects..
Post by: Baggey on Jun 12, 2025, 06:18 PM
Quote from: Hardcoal on Jun 12, 2025, 02:27 PM(https://i.imgur.com/mMstDBs.jpeg)

ONE subsection of my music project is cell recorder..
its like in ableton that you can press a cell and record and than
loop the whole Column..




Id love to know how to write something like this? Id love to write a tracker.

Baggey
Title: Re: Hardcoal's Music Projects..
Post by: Hardcoal on Jun 12, 2025, 07:11 PM
I always love to help those who want help
and save them all the trouble i went through.
so if you have questions, ask..
also i have an idea to make one big shared library
like a type of an engine
same like modules but without compile so it can be accessed easily and
changed
Title: Re: Hardcoal's Music Projects..
Post by: Baggey on Jun 12, 2025, 07:39 PM
Quotealso i have an idea to make one big shared library
like a type of an engine

Not sure what you mean by this?

Quotesame like modules but without compile so it can be accessed easily and
changed

Well that's a BIG LIKE from me  ;)

I try to access code where people try to help and you have to cmake and compile etc.. That's me stumpped! ::)
Title: Re: Hardcoal's Music Projects..
Post by: Hardcoal on Jun 12, 2025, 09:15 PM
I might explain what i mean in a new post..
explaining the method i work