Giter Club home page Giter Club logo

Comments (8)

GoodnessEzeokafor avatar GoodnessEzeokafor commented on May 22, 2024 1

ok thanks alot
will definetely try this

from matchering.

GoodnessEzeokafor avatar GoodnessEzeokafor commented on May 22, 2024 1

lols, i did a little hack
just added the file path to my context
context = { 'mastered1':f'/media/mastered/{track.user.id}/{track.name_of_track}/my_song_master_16bit.wav', 'mastered2':f'/media/mastered/{track.user.id}/{track.name_of_track}/my_song_master_24bit.wav' }
in my html file
<p > <a href="{{mastered1}}" class="btn btn-primary">Download Mastered Track 1</a> </p> <p > <a href="{{mastered2}}" class="btn btn-primary">Download Mastered Track 2</a> </p>

from matchering.

GoodnessEzeokafor avatar GoodnessEzeokafor commented on May 22, 2024

def master(request,pk):
track = get_object_or_404(Mastering, pk=pk)
print("TARGET TRACK PATH:",track.target_track.path)
print("TARGET REFERENCE PATH:",track.reference_track.path)
mastered = mg.process(
target=track.target_track.path,
reference=track.reference_track.path,
results=[
# mg.pcm16('my_song_master_16bit.wav'),
# mg.pcm24('my_song_master_24bit.wav')
mg.pcm16(f'{settings.MEDIA_URL}{track.user.username}/mastered/my_song_master_16bit.wav'),
mg.pcm24(f'{settings.MEDIA_URL}{track.user.username}/mastered/my_song_master_24bit.wav'),
],
)

return HttpResponse("MASTER")

from matchering.

sergree avatar sergree commented on May 22, 2024

bastibe/python-soundfile#227

It seems PySoundFile can't write to this directory.

from matchering.

GoodnessEzeokafor avatar GoodnessEzeokafor commented on May 22, 2024

Sory Doesn't the result argument creates and writes to the directory????

from matchering.

sergree avatar sergree commented on May 22, 2024

Here's how PySoundFile library works.
https://pysoundfile.readthedocs.io/en/latest/#soundfile.write
It doesn't create a directory if it doesn't exist and have no args to change this behaviour. Your app need to prepare these dirs on its own.

from matchering.

GoodnessEzeokafor avatar GoodnessEzeokafor commented on May 22, 2024

@sergree any script on how to download the mastered tracks in django ?????

from matchering.

sergree avatar sergree commented on May 22, 2024

Soon, this month

from matchering.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.