import React, {useEffect, useState, useRef} from "react"; import ReactDOM from "react-dom"; import {getCurrentUser, getJamTrackPublic} from '../../helpers/rest'; import JKJamTrackPreview from './JKJamTrackPreview'; import {AppDataProvider} from '../../context/AppDataContext'; import {JamTrackPreviewProvider} from '../../context/JamTrackPreviewContext' import {useHistory} from "react-router-dom"; import useJamTrackShopping from "../../hooks/useJamTrackShopping"; import UserAuth, {useAuth} from '../../context/UserAuth'; const awesome1 = '/img/landing/jamtracks/Top 10 Image - Number 1.png'; const awesome2 = '/img/landing/jamtracks/Top 10 Image - Number 2.png'; const awesome3 = '/img/landing/jamtracks/Top 10 Image - Number 3.png'; const awesome4 = '/img/landing/jamtracks/Top 10 Image - Number 4.png'; const awesome5 = '/img/landing/jamtracks/Top 10 Image - Number 5.png'; const awesome6 = '/img/landing/jamtracks/Top 10 Image - Number 6.png'; const awesome7 = '/img/landing/jamtracks/Top 10 Image - Number 7.png'; const awesome8 = '/img/landing/jamtracks/Top 10 Image - Number 8.png'; const awesome9 = '/img/landing/jamtracks/Top 10 Image - Number 9.png'; // To test this component in isolation, go to: // http://beta.jamkazam.local:4000/public/backing-tracks/artist/song // But this is only for development const BodyComponent = ({ id = "1", plan_code = "jamtrack-acdc-backinblack", slug = "ac-dc-back-in-black", artist = "AC/DC (defaulted)", song = "Back in Black (defaulted)", provided_jam_track = null }) => { const [jamTrack, setJamTrack] = useState(provided_jam_track) const [jamTrackLoading, setJamTrackLoading] = useState(false) const history = useHistory() const {addToCart} = useJamTrackShopping() const { currentUser } = useAuth(); console.log(`loading jamtrack with slug ${slug}`) const isLoggedIn = () => { return currentUser != null } const hasFreeJamTrack = () => { return currentUser == null || currentUser.show_free_jamtrack } const ctaClick = () => { const addJamTrackToCart = async () => { try { await addToCart(jamTrack, true); } catch (error) { console.error(error); alert("Unable to add JamTrack to your cart."); } } if (hasFreeJamTrack()) { if (isLoggedIn()) { // add to shopping cart automatically and then redirect to shopping cart page addJamTrackToCart() } else { console.log("no user") // redirect to the signup screen with the jamtrack & artist params set window.location.href = "/auth/signup?jamtrack=" + encodeURIComponent(slug) } } else { // This would mean there is a user in context, also, don't show the free option for this user (they already have a free jamtrack) addJamTrackToCart() } } const ConditionalLoader = () => { if (jamTrack == null) { return
Loading...
} return null; } const CtaButton = () => { const btnText = hasFreeJamTrack() ? "Claim Free Backing Track" : "Add To Cart" return }; const freeRef = useRef(null); const limitedRef = useRef(null); // Function to sync height const updateHeight = () => { // Matches when width >= 1000px - check in _landing.scss for the matching 999px rule const isWideScreen = window.matchMedia("(min-width: 1000px)").matches; if (!isWideScreen) { // Reset the height when inactive if (limitedRef.current) limitedRef.current.style.maxHeight = "unset"; return; // Do nothing if screen width < 999px } if (freeRef.current && limitedRef.current) { limitedRef.current.style.maxHeight = `${freeRef.current.offsetHeight}px`; } }; //coming to signup page after clicking on jamtrack or artist useEffect(() => { console.log("useEffect, currentUser", currentUser) updateHeight(); // Run after initial render window.addEventListener("resize", updateHeight); // Listen to resize const jamtrack_api_options = {plan_code: plan_code} console.log(`jamtrack properties id=${id} plan_code=${plan_code} slug=${slug} artist=${artist} song=${song}`) // This ensures we only try once here as well if (!jamTrackLoading && jamTrack == null) { // tracks should look like: console.log("loading jamtrack", jamTrack) // { // "id": "43554b1d-d95e-4910-bf4f-ed025f9625f3", // "part": "Master", // "instrument": { // "id": "acoustic guitar", // "description": "Acoustic Guitar", // "created_at": "2013-01-03T01:57:43.040Z", // "updated_at": "2013-01-03T01:57:43.040Z", // "popularity": 3 // }, // "track_type": "Master", // "position": 1000, // "preview_mp3_url": "https://jamkazam-staging-public.s3.amazonaws.com/jam_track_previews/AC/DC/Back%20in%20Black/Back%20in%20Black%20Master%20Mix-44100-preview-aabb9fc9774e5657a54e00733269abb8.mp3", // "preview_ogg_url": "https://jamkazam-staging-public.s3.amazonaws.com/jam_track_previews/AC/DC/Back%20in%20Black/Back%20in%20Black%20Master%20Mix-44100-preview-72bc0b532410e5ac3aa7d89c854ef57b.ogg", // "preview_aac_url": "https://jamkazam-staging-public.s3.amazonaws.com/jam_track_previews/AC/DC/Back%20in%20Black/Back%20in%20Black%20Master%20Mix-44100-preview-4402df19d0615844db14fb77bd4da467.aac" // } // Out of convenience, we can support both a generated, 'I have everything I need', as well as a developer // friendly, grab tracks from my local server const fetchJamTrack = async () => { try { const response = await getJamTrackPublic(jamtrack_api_options); const jamTrack = await response.json(); console.log("jamtrack loaded", jamTrack); setJamTrack(jamTrack) setJamTrackLoading(false) } catch (error) { console.error(error); setJamTrackLoading(false) const dev_track = { "id": "43554b1d-d95e-4910-bf4f-ed025f9625f3", "part": "Master", "instrument": { "id": "acoustic guitar", "description": "Acoustic Guitar", "created_at": "2013-01-03T01:57:43.040Z", "updated_at": "2013-01-03T01:57:43.040Z", "popularity": 3 }, "track_type": "Master", "position": 1000, "preview_mp3_url": "https://jamkazam-staging-public.s3.amazonaws.com/jam_track_previews/AC/DC/Back%20in%20Black/Back%20in%20Black%20Master%20Mix-44100-preview-aabb9fc9774e5657a54e00733269abb8.mp3", "preview_ogg_url": "https://jamkazam-staging-public.s3.amazonaws.com/jam_track_previews/AC/DC/Back%20in%20Black/Back%20in%20Black%20Master%20Mix-44100-preview-72bc0b532410e5ac3aa7d89c854ef57b.ogg", "preview_aac_url": "https://jamkazam-staging-public.s3.amazonaws.com/jam_track_previews/AC/DC/Back%20in%20Black/Back%20in%20Black%20Master%20Mix-44100-preview-4402df19d0615844db14fb77bd4da467.aac" } setJamTrack({id, tracks: [dev_track]}) } } setJamTrackLoading(true); fetchJamTrack(); } return () => window.removeEventListener("resize", updateHeight); }, [currentUser, jamTrack, jamTrackLoading]); return (

Free {song} By {artist} Backing Track

Our JamTracks take backing tracks to another level. Click the play icons in the Preview box to hear the full backing track mix and each of its parts. You can use our free website or our free app to easily make custom backing track mixes – e.g. to hear just one part as you learn it, to mute that one part to play along with the band, to slow down playback for practice while building up your speed, to change pitch/key up or down, and to record yourself in high-quality audio and video playing or singing with the track to share with family and friends. Click the button below to get your {song} by {artist} backing track now! Or scroll down to learn more.

Join 300,000+ other musicians who love our backing tracks!

Preview Backing Track

{ConditionalLoader()}

{artist} - {song}

Click the play buttons below to preview the master mix and 20-second samples of each fully isolated part of the backing track.

{jamTrack != null && }

Watch Video to See How Our Backing Tracks Work

What Makes Our Backing Tracks Awesome?

Huge, High Quality Backing Track Catalog

Backing track screenshot with volume controls for each part JamKazam offers a catalog of 9,000+ backing tracks. We carefully curate each backing track for quality, and every one includes fully isolated tracks for each part of the music - .e.g. lead vocal, backing vocals, lead guitar, rhythm guitar, keys, bass, drums, etc. This gives you complete creative control over every aspect of the music and how you want to use it for learning, practice, recording, mixing, and other creative endeavors.

Solo, Mute, Pan or Set Level on Any Part

Backing track screenshot with controls to solo, mute, or pan each part When learning to play a part, it's incredibly valuable to be able to hear just one part in isolation. Once you've learned your part, you can turn around and mute just that one part of the backing track, and then play along with the rest of the band. Or if you prefer, you can turn that part down low but keep it around as a subtle hint. Or pan the recorded track into your left ear while your live performance is panned into your right ear. You are in control.

Make Custom Mixes

Backing track screenshot with custom mixes created by the user When you've customized your backing track mix, you can easily save your custom mixes to use them again later without having to recreate them. Your custom mixes are saved to the JamKazam cloud, so you can access them from almost any Internet-connected device. If you want to use your mixes outside the JamKazam website or app, you can also export custom mixes as a simple .mp3, .wav, or .ogg audio files to use anywhere.

Slow Down Backing Track For Practice

Backing track screenshot with controls to slow down or speed up tempo You can easily slow down playback of your backing track by a specific % without changing pitch, so the song still sounds "right", just slower. This is great for building your technique on tougher sections while gradually increasing tempo. You can also make backing tracks play faster if you want to hit the jets.

Change Backing Track Pitch/Key

Backing track screenshot with controls to change pitch or key If you're a singer and you need to bring the song down into your vocal range, or if you're an instrumentalist and want to change the piece to a different key, you can change the pitch of any backing track up or down by a specified number of semitones (half steps).

Make & Share Recordings

Backing track screenshot with recording features Use the JamKazam app to make either audio-only or video + audio recordings of yourself playing or singing along with your backing track. The app captures video from built-in or external webcams and combines this video with the audio of the backing track mixed with your live performance into a single integrated video, delivering far higher audio quality than a smartphone recording.

Download the Parts of the Backing Track

Backing track screenshot with download features If you want to use the individual parts of the backing track outside the JamKazam website or app, you can also download all the individual parts (e.g. lead vocal, drums, bass, etc.) to your computer to use in a DAW (digital audio workstation) or other apps for creating remixes, etc.

Use Plugins with Backing Tracks

Backing track screenshot with audio plugin effect example The free JamKazam app lets you easily apply VST & AU plugins to your live performance, mixed together seamlessly with your backing track. For example, guitarists can apply popular amp sims like AmpliTube to get just the right guitar tone to match the song, and vocalists can apply effects like reverb or pitch correction.

Use MIDI Instruments with Backing Tracks

Backing track screenshot with MIDI keyboard example The free JamKazam app also lets you use MIDI instruments and mix and record this instrumental audio with backing tracks. For example, keys players can use MIDI keyboard controllers with plugins to generate traditional piano sounds, Rhodes electric piano, Hammond organ, and other classic keys tones. And drummers who use electronic kits can use their favorite plugins to power their percussive audio.

Play Live In Sync With Others Over the Internet

Perhaps the most mind-blowing thing you can do with JamKazam is that you can play live in sync with others from different locations over the Internet using the free JamKazam app and platform. You can play with your backing tracks in these sessions, with live musicians playing some parts and the backing track filling in the others.
); }; export default BodyComponent;