程序员音乐_预订音乐会的程序员指南
程序員音樂
by Sina Habibian
通過新浪Habibian
預訂音樂會的程序員指南 (The Programmer’s Guide to Booking a Concert)
About two months ago, a friend and I decided to organize a concert in San Francisco. We had no prior experience promoting shows, but we both loved live music and felt up to the challenge. Plus, 2016 had been a crappy year, and it seemed like this would be a good way to bring the community together and end the year on a positive note.
大約兩個月前,我和一個朋友決定在舊金山舉辦一場音樂會。 我們以前沒有進行演出推廣的經驗,但是我們都熱愛現場音樂,并且能夠應對挑戰。 另外,2016年是糟糕的一年,這似乎是將社區團結在一起并以積極的姿態結束這一年的好方法。
We began by reaching out to local acts we personally knew with hopes of booking them for a concert in December. A week later, we had exhausted our list of contacts and still had no success. I began thinking about whether we could analyze social media to scout local musicians.
我們首先接觸了我們個人熟悉的地方演出,希望能在12月為他們預定一場音樂會。 一周后,我們已經用盡了所有聯系人列表,但仍然沒有成功。 我開始考慮我們是否可以分析社交媒體來偵察本地音樂家。
I decided to look into Soundcloud, the de facto online hangout for musicians. Having met a few musicians through another project, I knew they routinely used the platform to distribute music and connect with fans. It didn’t matter who or where someone was — a bedroom DJ in SoMa, a garage band in Mountain View, or a singer-songwriter in Oakland — they all posted music on Soundcloud. And as long as they had posted a single track, I knew I would be able to find them.
我決定研究Soundcloud,這是事實上的針對音樂家的在線視頻群聊。 在另一個項目中結識了一些音樂家之后,我知道他們經常使用該平臺來分發音樂并與粉絲建立聯系。 不管是誰或在哪里,無論是SoMa中的臥室DJ,Mountain View中的車庫樂隊,還是奧克蘭的歌手創作者,他們都在Soundcloud上發布了音樂。 只要他們發布了單曲,我就知道我可以找到他們。
爬行Soundcloud圖 (Crawling the Soundcloud Graph)
A quick look at Soundcloud’s Search API revealed that it wouldn’t be adequate. The simple keyword search would not allow me to write a query like “return any user based in San Francisco or Oakland who has less than 10k followers and has posted at least one track”.
快速瀏覽一下Soundcloud的Search API,發現它不夠用。 簡單的關鍵字搜索不允許我編寫類似“返回位于舊金山或奧克蘭的跟蹤者少于1萬且已發布至少一條曲目的用戶”之類的查詢。
Looking for a solution, I realized that crawling the social graph could be an effective approach. I could write an algorithm which, when seeded with a Soundcloud user, would pull all their followers and followings, and then in turn pull all followers and followings for each of those users. This simple recursive algorithm would expand to cover thousands of users after a few iterations. I would then have the luxury to analyze the social connections any which way, the easiest of which would be writing a SQL query.
在尋找解決方案時,我意識到抓取社交圖可能是一種有效的方法。 我可以編寫一種算法,當該算法植入Soundcloud用戶后,將提取其所有關注者和關注者,然后依次為每個用戶提取所有關注者和關注者。 經過幾次迭代,此簡單的遞歸算法將擴展為覆蓋數千個用戶。 然后,我將可以通過任何方式來分析社交關系,最簡單的方式就是編寫SQL查詢。
I picked Afrolicious, Mark Slee, EARMILK and a few others as seed accounts. These users are deeply integrated into the hip hop, electronic, and indie scenes of San Francisco. I was confident that their combined social graph would provide a diverse and complete representation of Bay Area music.
我選擇了Afrolicious,Mark Slee,EARMILK和其他一些作為種子帳戶。 這些用戶已深入集成到舊金山的嘻哈,電子和獨立場景中。 我有信心,他們的綜合社交圖譜將為灣區音樂提供多樣化和完整的表現。
As I began experimenting with the algorithm, I realized that it was impractical to pull a user’s followers. Musicians regularly have tens or hundreds of thousands of followers (Calvin Harris at the extreme end of the spectrum has 7.08m followers). Pulling all followers for all users was obviously a sub-optimal approach. I also didn’t intend on paying a thousand dollars a month in database costs.
當我開始嘗試該算法時,我意識到吸引用戶的追隨者是不切實際的。 音樂家通常有成千上萬的追隨者(最極端的卡爾文·哈里斯有708萬追隨者)。 為所有用戶吸引所有關注者顯然不是最佳選擇。 我也不打算每月支付一千美元的數據庫費用。
The solution was to crawl only the followings and not the followers. Musicians follow other musicians. Interestingly enough, there are even papers that have analyzed this behavior and the “virtual scenes” that emerge (Allington et al., 2015). By crawling the following graph, I could efficiently map out the local music scene. Furthermore, by keeping track of who follows who, I could later use an algorithm like PageRank to find up-and-comers who do not yet have many followers but nevertheless have a vote of confidence from the community.
解決方案是僅爬網以下內容,而不是追隨者。 音樂家跟隨其他音樂家。 有趣的是,甚至有論文都分析了這種行為以及出現的“虛擬場景”( Allington等,2015 )。 通過抓取下圖,我可以有效地映射出本地音樂場景。 此外,通過跟蹤誰跟隨誰,我以后可以使用諸如PageRank之類的算法來查找尚不具備很多追隨者但仍然獲得社區信任的投票者。
I built a Sinatra app to crawl the Soundcloud social graph and saved all users and their relationships to a Postgres database. After a few iterations, there were over 200k users and 500k relationships. It was time to make sense of the data.
我構建了一個Sinatra應用程序來爬取Soundcloud社交圖,并將所有用戶及其關系保存到Postgres數據庫中。 經過幾次迭代,有超過20萬個用戶和50萬個關系。 現在是時候理清數據了。
分析網絡 (Analyzing the Network)
I wrote a Python script to query the database for any Soundcloud user with at least 500 followers, at least one track, and based in San Francisco or Oakland. I then mapped out these users and their relationships onto a Networkx directed graph. It was then simple to export a .gexf graph file which could be consumed by Gephi for visual analysis.
我編寫了一個Python腳本來查詢數據庫,以查找在San Francisco或Oakland具有至少500個關注者,至少一個軌道的任何Soundcloud用戶。 然后,我將這些用戶及其關系映射到Networkx定向圖上。 它是那么簡單的出口可能通過消耗一個.gexf圖形文件Gephi的可視化分析。
Gephi turned out to be an incredible tool for visualizing social networks and gave me more than enough to play with.
事實證明,Gephi是用于可視化社交網絡的不可思議的工具,并且給了我足夠的樂趣。
The above is a force-directed graph of the Soundcloud network. I first used PageRank to leverage the existing follower-following relationships and determine which the most important nodes are. This is represented as the size of a node. I then layered on a built-in modularity optimization algorithm to detect communities. The community is represented as the color of a node.
上面是Soundcloud網絡的力導向圖。 我首先使用PageRank來利用現有的關注者跟蹤關系,并確定最重要的節點。 這表示為節點的大小。 然后,我基于內置的模塊化優化算法來檢測社區。 社區表示為節點的顏色。
This graph provides an interesting viewpoint into the San Francisco music scene. The largest node, Anthony Mansfield, is a veteran Bay Area House DJ who is also deeply involved with the Disco Knights Burning Man camp. Another large node is Honey Sound System, a DJ collective who calls San Francisco home. The bottom-left of the graph is a Hip Hop cluster including San Francisco artists like Telli Prego and Show Banga.
該圖為舊金山音樂界提供了有趣的觀點。 最大的節點是安東尼·曼斯菲爾德(Anthony Mansfield),是一位經驗豐富的海灣地區之家DJ,他還深入參與了“迪斯科騎士燃燒人”營地。 另一個大型節點是Honey Sound System,這是DJ的一個組織,他把舊金山稱為家。 圖的左下角是一個Hip Hop集群,其中包括Telli Prego和Show Banga等舊金山藝術家。
Our goal was to find musicians for our upcoming concert. Ironically, this was now tough given the quantity of available options. We had identified over a thousand Soundcloud accounts as musicians in the Bay Area. We did not have a good way of listening to this amount of music short of copying each Soundcloud URL into the browser. Furthermore, we wanted input from our friends and community on who they liked to see live.
我們的目標是為即將舉行的音樂會尋找音樂家。 具有諷刺意味的是,鑒于可用選項的數量,這現在很難。 我們已經確定了1000多個Soundcloud帳戶是灣區的音樂家。 除了將每個Soundcloud URL復制到瀏覽器之外,我們沒有一種聽音樂的好方法。 此外,我們希望我們的朋友和社區提供有關他們喜歡現場直播的人的意見。
偵察人才 (Scouting Talent)
To address these issues, I added a UI layer to the Sinatra app so that we could streamline our scouting efforts. It showed a list of musicians ranked according to the results of the earlier network analysis. There was an embedded Soundcloud widget so that we could listen to an artist’s music without leaving the page. I also added a rating system so that we could assess each artist and comment on whether we wanted to see them live.
為了解決這些問題,我在Sinatra應用程序中添加了一個UI層,以便我們可以簡化偵察工作。 它顯示了根據早期網絡分析結果排名的音樂家名單。 有一個嵌入式Soundcloud小部件,因此我們可以在不離開頁面的情況下收聽藝術家的音樂。 我還添加了一個評分系統,以便我們可以評估每個藝術家并評論我們是否希望看到他們的生活。
I then layered on a user authentication scheme so that multiple people could use the system at once. We enlisted the help of a few friends living in the city who also appreciate music. With their help and our newly built talent scouting system, we collectively listened to and voted on 400 artists. I then built an admin page so that I could see the best rated musicians across the platform.
然后,我建立了一個用戶身份驗證方案,以便多個人可以一次使用該系統。 我們爭取到了一些住在城市的朋友的幫助,他們也喜歡音樂。 在他們的幫助下以及我們新建立的人才發掘系統,我們共同聽取了400位藝術家的意見并對其進行了投票。 然后,我建立了一個管理頁面,以便可以看到整個平臺上評分最高的音樂家。
We had crowd-sourced our scouting efforts and were starting to find some gems. More importantly, we had validated demand on which local acts our friends and community wanted to see live.
我們通過眾包方式進行了探索工作,并開始發現一些寶石。 更重要的是,我們已經驗證了對我們的朋友和社區希望現場直播哪些地方行為的需求。
預約演出 (Booking the Show)
With things coming together, we gave ourselves a name: the Gremlins. Gremlins are cute, mischievous, and are always messing around and breaking things. This seemed fitting given our progress so far.
隨著事情的發展,我們給自己起了個名字:格林姆斯。 小妖精可愛,調皮,并且總是四處亂逛并破壞事物。 鑒于我們到目前為止的進展,這似乎很合適。
We reached out to a few of our favorite new artists, and booked two funky and talented local acts: Foxtails Brigade and Baby’s Day Out. We were talking with venues in parallel and landed a night at The Lost Church, a cozy theatre in The Mission with capacity for 75 people. The wooden interior and the eclectic artwork strewn about the place were inline with the atmosphere we were trying to create.
我們接觸了一些我們最喜歡的新藝術家,并預訂了兩個時髦又有才華的當地表演:狐尾旅和嬰兒節。 我們在平行討論場地,并在The Lost Church住了一個晚上,這是The Mission舒適的劇院,可容納75人。 木制內部和周圍散布著的折衷藝術品與我們試圖營造的氛圍相呼應。
格林姆斯出席 (The Gremlins Present)
A month later, we walked into The Lost Church on the night of the concert. I felt a sense of fulfillment as we welcomed friends and friends-to-be into the theatre. The show was sold out.
一個月后,我們在音樂會之夜走進了失落的教堂。 當我們歡迎朋友和將來成為劇院的朋友時,我感到很滿足。 該節目被搶購一空。
Laura from Foxtails Brigade and Meggy and Mel from Baby’s Day Out shared their music with a lively audience. We followed them through joyful and melancholic moments. It was a memorable evening.
Foxtails Brigade的Laura和Baby's Day Out的Meggy and Mel與活躍的聽眾分享了他們的音樂。 我們跟隨他們經歷了快樂而憂郁的時刻。 那是一個令人難忘的夜晚。
In coordinating this concert, I experienced two weirdly different perspectives on viewing a ‘musician’. First, as a node whose relative importance and degree of connectedness can be calculated in a connected network. Second, as a soulful and talented human being who can move an audience through the expression of their art.
在協調這場音樂會時,我在觀看“音樂家”時遇到了兩種截然不同的觀點。 首先,作為可以在連接的網絡中計算其相對重要性和連接程度的節點。 其次,作為一個充滿靈魂和才華的人,他們可以通過他們的藝術表達來吸引觀眾。
This dichotomy is a fact of life in today’s world. We are each heavily networked within the social graphs of Facebook, Instagram, and Twitter. It’s fascinating to think of ourselves as nodes in this perspective. I wonder what insights tinkerers at these companies have gleaned about our inner lives.
這種二分法是當今世界的現實。 我們每個人都在Facebook,Instagram和Twitter的社交圖中緊密地聯系在一起。 從這個角度來看,將自己視為節點非常有趣。 我想知道這些公司的修補匠對我們的內心生活有何見解。
Subscribe to follow my writing, or ping me on Twitter.
訂閱 以跟隨我的寫作,或在Twitter上 ping我。
翻譯自: https://www.freecodecamp.org/news/the-programmers-guide-to-booking-a-concert-e048a580735f/
程序員音樂
總結
以上是生活随笔為你收集整理的程序员音乐_预订音乐会的程序员指南的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 数学建模学习笔记(六):排队论模型
- 下一篇: 下载网页 TS视频并自动合成视频